您好我对已经制作的应用程序进行了一些更改...现在它在启动后立即失败..
这是日志条目详细信息:
08-21 06:01:58.726: D/AndroidRuntime(782): Shutting down VM
08-21 06:01:58.756: W/dalvikvm(782): threadid=1: thread exiting with uncaught exception (group=0x414c4700)
08-21 06:01:58.796: E/AndroidRuntime(782): FATAL EXCEPTION: main
08-21 06:01:58.796: E/AndroidRuntime(782): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{hellog.diwesh.NugaBest/helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro}: java.lang.ClassNotFoundException: Didn't find class "helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro" on path: DexPathList[[zip file "/data/app/hellog.diwesh.NugaBest-2.apk"],nativeLibraryDirectories=[/data/app-lib/hellog.diwesh.NugaBest-2, /system/lib]]
08-21 06:01:58.796: E/AndroidRuntime(782): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
08-21 06:01:58.796: E/AndroidRuntime(782): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
08-21 06:01:58.796: E/AndroidRuntime(782): at android.app.ActivityThread.access$600(ActivityThread.java:141)
08-21 06:01:58.796: E/AndroidRuntime(782): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-21 06:01:58.796: E/AndroidRuntime(782): at android.os.Handler.dispatchMessage(Handler.java:99)
08-21 06:01:58.796: E/AndroidRuntime(782): at android.os.Looper.loop(Looper.java:137)
08-21 06:01:58.796: E/AndroidRuntime(782): at android.app.ActivityThread.main(ActivityThread.java:5103)
08-21 06:01:58.796: E/AndroidRuntime(782): at java.lang.reflect.Method.invokeNative(Native Method)
08-21 06:01:58.796: E/AndroidRuntime(782): at java.lang.reflect.Method.invoke(Method.java:525)
08-21 06:01:58.796: E/AndroidRuntime(782): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
08-21 06:01:58.796: E/AndroidRuntime(782): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-21 06:01:58.796: E/AndroidRuntime(782): at dalvik.system.NativeStart.main(Native Method)
08-21 06:01:58.796: E/AndroidRuntime(782): Caused by: java.lang.ClassNotFoundException: Didn't find class "helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro" on path: DexPathList[[zip file "/data/app/hellog.diwesh.NugaBest-2.apk"],nativeLibraryDirectories=[/data/app-lib/hellog.diwesh.NugaBest-2, /system/lib]]
08-21 06:01:58.796: E/AndroidRuntime(782): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
08-21 06:01:58.796: E/AndroidRuntime(782): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
08-21 06:01:58.796: E/AndroidRuntime(782): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
08-21 06:01:58.796: E/AndroidRuntime(782): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
08-21 06:01:58.796: E/AndroidRuntime(782): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
08-21 06:01:58.796: E/AndroidRuntime(782): ... 11 more
08-21 06:02:36.656: I/Process(782): Sending signal. PID: 782 SIG: 9
答案 0 :(得分:8)
如果使用Eclipse进行开发,请转到Java构建路径/订单导出并将所有特定库放在第一位。
这解决了这个问题。
答案 1 :(得分:1)
您是否在清单中添加了新的课程NUGA_HealthCareActivity_Intro
?
答案 2 :(得分:0)
你的例外说,
Caused by: java.lang.ClassNotFoundException: Didn't find class "helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro" on path: DexPathList[[zip file "/data/app/hellog.diwesh.NugaBest-2.apk"],nativeLibraryDirectories=[/data/app-lib/hellog.diwesh.NugaBest-2, /system/lib]]
这意味着您正在尝试访问类helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro
,但Android的类加载器无法找到此类。
此类不存在于您的eclipse代码中以及保存在libs目录中的jar库
这个类是从库jar中引用的吗? 尝试用最新的库替换库jar。
答案 3 :(得分:0)
您的舱单中有问题,可能是这样,
检查你的包名和类名,它可能不一样..
你的这个活动是无法解决的,检查一下,
helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro
修改强>
将您的lib
文件夹名称更改为libs
,