简体   繁体   中英

Android, java class not found exception

I developed an android application which includes some classes, when I tried to run application I see this in log Could not find class 'com.voice.NevisaWebService', referenced from method com.voice.Main.upload but application starts, when I do something in app that needs NevisaWebService class this error appears and application stops working java.lang.NoClassDefFoundError: com.voice.NevisaWebService , what does it mean? I have this class in my wokspace and everything is write why does this error appears?

here is full logcat:

在此处输入图片说明

Try this:

Go to Project/Properties/Java Build Path/Order and Export -- Make sure there's a check in front of Android Dependencies and the support library, if you use it.Mark all checkboxes.Click on Apply and clean the project.

This worked for me.Hope this helps.

  1. Please check whether all your Activities included in the AndroidManifest.xml file otherwise add to it.

  2. add environment variable for JAVA path from eg, C:\\Program Files\\Java\\jre6\\bin

检查导入和class.class访问修饰符的可见性必须是public。然后尝试清理和重建。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM