一旦我加载应用程序,它就会立即在我的模拟器上崩溃。它以前从来没有这样做过,我最近对我的 Android SDK Manager 进行了更新 4.2.2 但我认为这可能不是问题,但我只是不知道。
我的项目保存在我的 C:\Users\Joey\development\LibrarySmite11
每当我在模拟器上加载我的应用程序时,我都会收到以下消息:
05-28 12:27:19.364: W/dalvikvm(6397): Unable to resolve superclass of Ljoseph/lubonty/librarysmite11/Splash; (37)
05-28 12:27:19.364: W/dalvikvm(6397): Link of class 'Ljoseph/lubonty/librarysmite11/Splash;' failed
05-28 12:27:19.364: D/AndroidRuntime(6397): Shutting down VM
05-28 12:27:19.364: W/dalvikvm(6397): threadid=1: thread exiting with uncaught exception (group=0x409961f8)
05-28 12:27:19.384: E/AndroidRuntime(6397): FATAL EXCEPTION: main
05-28 12:27:19.384: E/AndroidRuntime(6397): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{joseph.lubonty.librarysmite11/joseph.lubonty.librarysmite11.Splash}: java.lang.ClassNotFoundException: joseph.lubonty.librarysmite11.Splash
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1879)
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.app.ActivityThread.access$600(ActivityThread.java:122)
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.os.Handler.dispatchMessage(Handler.java:99)
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.os.Looper.loop(Looper.java:137)
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.app.ActivityThread.main(ActivityThread.java:4340)
05-28 12:27:19.384: E/AndroidRuntime(6397): at java.lang.reflect.Method.invokeNative(Native Method)
05-28 12:27:19.384: E/AndroidRuntime(6397): at java.lang.reflect.Method.invoke(Method.java:511)
05-28 12:27:19.384: E/AndroidRuntime(6397): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-28 12:27:19.384: E/AndroidRuntime(6397): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-28 12:27:19.384: E/AndroidRuntime(6397): at dalvik.system.NativeStart.main(Native Method)
05-28 12:27:19.384: E/AndroidRuntime(6397): Caused by: java.lang.ClassNotFoundException: joseph.lubonty.librarysmite11.Splash
05-28 12:27:19.384: E/AndroidRuntime(6397): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
05-28 12:27:19.384: E/AndroidRuntime(6397): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-28 12:27:19.384: E/AndroidRuntime(6397): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
05-28 12:27:19.384: E/AndroidRuntime(6397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1870)
05-28 12:27:19.384: E/AndroidRuntime(6397): ... 11 more
当我查看这些消息时,我想知道为什么警告中的“joseph”前面有一个“L”,我不确定这是否是问题所在,但这只是一个想法。
在 LogCat 中引起我注意的另外两件事:
其中1个是这样的:
05-28 12:27:19.384: E/AndroidRuntime(6397): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{joseph.lubonty.librarysmite11/joseph.lubonty.librarysmite11.Splash}:
为什么我看到:
ComponentInfo{joseph.lubonty.librarysmite11/joseph.lubonty.librarysmite11.Splash}
应该是:
ComponentInfo{joseph.lubonty.librarysmite11.Splash}
?
另一个是当我在 LogCat 上查看这些行时:
05-28 12:27:19.384: E/AndroidRuntime(6397): Caused by: java.lang.ClassNotFoundException: joseph.lubonty.librarysmite11.Splash
05-28 12:27:19.384: E/AndroidRuntime(6397): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
我觉得这两条线是我需要检查的地方,但老实说,我对这句话的内容感到目瞪口呆。我实际上是在盯着我的项目中的 Splash 类,它说找不到它。有人知道为什么会这样吗?