Issue
One of my menu items in my application simply tries to invoke another activity (that belongs to a different project in the same workspace):
myActivity.startActivity(new Intent(myActivity, com.bill.the.App.class));
But that immediately results in an exception at runtime:
E/AndroidRuntime(3847): java.lang.NoClassDefFoundError: com.bill.the.App
Why?
What am I missing?
(the project compiles and build just fine, it's only at run time that this error occurs)
Solution
It could be that the project or library containing com.bill.the.App is included in compilation search path, but not included in the resulting apk file (that is deployed to the device). If you include the project or library containing com.bill.the.App using a wrong way, this can happen. Make sure that you include it by using Android Library Project (project properties -> Android) or by including the jar file in the project properties -> Java Build Path -> Libraries.
Answered By - Randy Sugianto 'Yuku'
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.