我已经通过在其android属性中将'Is Library'设置为true来将现有的android项目(比如App1)转换为使用eclipse的android库项目。 然后在我的其他项目中(比如说App2),我在Eclipse的库引用中添加了App1,使用eclipse添加了这个库项目。 在App2中,我试图启动App1的一项活动。 我已经在App2的清单文件中提到了这个活动。访问库项目的类时NoClassDefFoundError
Intent intent = new Intent(TestActivity.this, ForYouActivity.class);
TestActivity.this.startActivityForResult(intent, 1);
但是当我运行应用程序,我得到一个错误
E/AndroidRuntime(2489): java.lang.NoClassDefFoundError: com.test.activities.ForYouActivity
请帮我出这一点。 在此先感谢
可以帮助你.. http://stackoverflow.com/questions/10005206/twitter4j-androidruntime446-java-lang-noclassdeffounderror-twitter4j-http/ 10007966#10007966 – MKJParekh 2012-04-11 11:49:35
感谢您回复@Frankenstein。我正在使用ADT 16.我尝试在我的项目中添加一个名为'libs'的文件夹,并且将我的库项目jar放入其中,但是我得到了同样的错误。 – Zeba 2012-04-11 13:12:27