程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> eclipse-Eclipse 在工程A中調用B的文件出錯

eclipse-Eclipse 在工程A中調用B的文件出錯

編輯:編程綜合問答
Eclipse 在工程A中調用B的文件出錯

我工程A想調用工程B的文件,我是如下配置的:A工程右鍵->configure build path ->projects選擇添加B工程。然後我直接在A中調用工程B的類(是在一個按鈕中調用的)。項目沒有報錯,編譯也可以過,可以當我APP安裝後,點擊這個調用了B類的按鈕就會出錯。錯誤如下

 Could not execute method of the activity
09-16 16:00:39.629: E/MyUncaughtHandler(16676): java.lang.IllegalStateException: Could not execute method of the activity
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at android.view.View$1.onClick(View.java:3725)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at android.view.View.performClick(View.java:4262)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at android.view.View$PerformClick.run(View.java:17351)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at android.os.Handler.handleCallback(Handler.java:615)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at android.os.Handler.dispatchMessage(Handler.java:92)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at android.os.Looper.loop(Looper.java:137)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at android.app.ActivityThread.main(ActivityThread.java:4935)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at java.lang.reflect.Method.invokeNative(Native Method)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at java.lang.reflect.Method.invoke(Method.java:511)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at dalvik.system.NativeStart.main(Native Method)
09-16 16:00:39.629: E/MyUncaughtHandler(16676): Caused by: java.lang.reflect.InvocationTargetException
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at java.lang.reflect.Method.invokeNative(Native Method)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at java.lang.reflect.Method.invoke(Method.java:511)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at android.view.View$1.onClick(View.java:3720)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     ... 11 more
09-16 16:00:39.629: E/MyUncaughtHandler(16676): Caused by: java.lang.NoClassDefFoundError: org.videolan.vlc.audio.AudioServiceController
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     at ixz.fish_help_app.GrpDevListActivity.sys_vlc(GrpDevListActivity.java:1895)
09-16 16:00:39.629: E/MyUncaughtHandler(16676):     ... 14 more

其中找不到的文件是我工程B中的文件。

最佳回答:


你需要把B中要用到的類編譯後生成jar庫導入到A中,然後安裝就沒有問題了

llx2007
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved