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:
enter image description here
-
Please post your error from logcat.Siddharth_Vyas– Siddharth_Vyas2013年11月07日 10:07:43 +00:00Commented Nov 7, 2013 at 10:07
-
Have you Add that Activity in Menifest file?MDroid– MDroid2013年11月07日 11:28:12 +00:00Commented Nov 7, 2013 at 11:28
-
I have just one main activityehsan mozafari– ehsan mozafari2013年11月07日 11:31:28 +00:00Commented Nov 7, 2013 at 11:31
-
Ok have you Package named Voice? and Where is the class named NavisaWebserice?MDroid– MDroid2013年11月07日 11:35:40 +00:00Commented Nov 7, 2013 at 11:35
-
Go to Project--> right click--> Properties--> Java BuildPath--> Order Export--> Tick all check boxes.. Clean Project and Run it againMDroid– MDroid2013年11月07日 11:36:55 +00:00Commented Nov 7, 2013 at 11:36
3 Answers 3
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.
8 Comments
Conversion to Dalvik format failed with error 1Check for imports and visibility of class.class access modifier must be public.and then try to clean and rebuilt.
Comments
Please check whether all your Activities included in the AndroidManifest.xml file otherwise add to it.
add environment variable for JAVA path from e.g, C:\Program Files\Java\jre6\bin