1

嗨,我对我已经制作的应用程序进行了一些更改......现在它在启动后立即失败..

这是日志条目详细信息:

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
4

4 回答 4

8

如果您使用 Eclipse 进行开发,请转到 Java 构建路径/订单导出并将所有特定库放在首位。

这解决了这个问题。

于 2013-08-26T10:31:26.977 回答
1

您是否NUGA_HealthCareActivity_Intro在清单中添加了新类?

于 2013-08-21T10:21:59.767 回答
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。

于 2013-08-21T10:25:59.237 回答
0

您的清单中有问题,可能是这个,检查您的包名和类名,它可能不一样..您的此活动无法访问,检查它, helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro

编辑

lib将您的文件夹名称更改为libs,

于 2013-08-21T10:26:58.227 回答