我刚刚将一个应用程序重构为框架库和应用程序,但现在当我尝试在模拟器中启动应用程序时,我得到以下错误堆栈跟踪:
06-02 18:22:35.529: E/AndroidRuntime(586): FATAL EXCEPTION: main
06-02 18:22:35.529: E/AndroidRuntime(586): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.matthewrathbone.eastersays/com.matthewrathbone.eastersays.EasterSimonSaysActivity}: java.lang.ClassNotFoundException: com.matthewrathbone.eastersays.EasterSimonSaysActivity in loader dalvik.system.PathClassLoader[/data/app/com.matthewrathbone.eastersays-1.apk]
06-02 18:22:35.529: E/AndroidRuntime(586): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
06-02 18:22:35.529: E/AndroidRuntime(586): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-02 18:22:35.529: E/AndroidRuntime(586): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-02 18:22:35.529: E/AndroidRuntime(586): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-02 18:22:35.529: E/AndroidRuntime(586): at android.os.Handler.dispatchMessage(Handler.java:99)
06-02 18:22:35.529: E/AndroidRuntime(586): at android.os.Looper.loop(Looper.java:123)
06-02 18:22:35.529: E/AndroidRuntime(586): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-02 18:22:35.529: E/AndroidRuntime(586): at java.lang.reflect.Method.invokeNative(Native Method)
06-02 18:22:35.529: E/AndroidRuntime(586): at java.lang.reflect.Method.invoke(Method.java:521)
06-02 18:22:35.529: E/AndroidRuntime(586): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-02 18:22:35.529: E/AndroidRuntime(586): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-02 18:22:35.529: E/AndroidRuntime(586): …Run Code Online (Sandbox Code Playgroud) java android classnotfoundexception android-library android-fragments
我创建并发布了我的第一个Android应用程序.这很简单.它在模拟器和一些手机上工作正常,但我收到此错误:
java.lang.RuntimeException: Unable to instantiate application cz.teamnovak.droid.Novak ESC Track guide: java.lang.ClassNotFoundException: cz.teamnovak.droid.Novak ESC Track guide in loader dalvik.system.PathClassLoader[/data/app/cz.teamnovak.droid-1.apk]
at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:649)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4232)
at android.app.ActivityThread.access$3000(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: cz.teamnovak.droid.Novak ESC Track guide in loader dalvik.system.PathClassLoader[/data/app/cz.teamnovak.droid-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
at android.app.Instrumentation.newApplication(Instrumentation.java:942)
at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:644)
... 11 more
Run Code Online (Sandbox Code Playgroud)
知道是什么原因引起的吗?
我的一个应用程序出了问题,我想知道是否有人可以给我任何洞察可能导致它的原因.
我得到一个ClassNotFoundException,下面的重要一行是
E/AndroidRuntime(21982): Caused by: java.lang.ClassNotFoundException: couk.doridori.goigo.customUI.GoBoardView in loader dalvik.system.PathClassLoader@446fc3d0
Run Code Online (Sandbox Code Playgroud)
现在这个应用程序已经出来超过一年和2天前我有两个单独的用户联系我这个问题,一个在HTC野火(2.1)和一个三星Galaxy S(?).现在我无法在我的设备(2.2和1.6)或模拟器(2.1)上重新创建此问题,并且无法解决为什么类加载器无法找到此类的问题.我花了一段时间谷歌搜索无济于事,并希望有人有一些指针!它似乎只是在加载一个活动时,当设置了contentView时,它会尝试给View 扩展一个名为GoBoardView的自定义视图扩展View类,这只是做一些简单的画布绘图,并没有使用任何第三方库或任何其他类会有包名冲突或任何东西.
请帮忙!为了防止它出现构建问题,我正在通过eclipse更新我的所有SDK和ADT,因为它正在构建1.6并使用旧的ADT,但我不知道这是否有助于只是想值得一试.任何建议都会非常感谢!(见下面的编辑)
E/AndroidRuntime(21982): java.lang.RuntimeException: Unable to start activity ComponentInfo{couk.doridori.goigoFull/couk.doridori.goigoFull.Board}: android.view.InflateException: Binary XML file line #14: Error inflating class couk.doridori.goigo.customUI.GoBoardView
E/AndroidRuntime(21982): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
E/AndroidRuntime(21982): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
E/AndroidRuntime(21982): at android.app.ActivityThread.access$2200(ActivityThread.java:126)
E/AndroidRuntime(21982): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
E/AndroidRuntime(21982): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(21982): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(21982): at android.app.ActivityThread.main(ActivityThread.java:4603)
E/AndroidRuntime(21982): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(21982): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(21982): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(21982): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime(21982): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(21982): Caused by: android.view.InflateException: Binary XML file …Run Code Online (Sandbox Code Playgroud)