最近我安装了 Ubuntu 12.04 来代替我的 Win7。我使用 Eclipse Juno / Java7。但是当我尝试运行我的应用程序时,尽管一切都在它的位置,但我得到了以下错误行。我的清单有正确的类名。我的活动文件名也与我的清单中的一样正确。但奇怪的是,此错误仅在我使用 ActionBarSherloock 的项目中引起。是不是很奇怪?
现在来自我的 logcat 的错误行:
08-20 19:31:59.545: E/AndroidRuntime(764): FATAL EXCEPTION: main
08-20 19:31:59.545: E/AndroidRuntime(764): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.app.android/com.app.android.SplashActivity}: java.lang.ClassNotFoundException: com.app.android.SplashActivity
08-20 19:31:59.545: E/AndroidRuntime(764): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
08-20 19:31:59.545: E/AndroidRuntime(764): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
08-20 19:31:59.545: E/AndroidRuntime(764): at android.app.ActivityThread.access$600(ActivityThread.java:123)
08-20 19:31:59.545: E/AndroidRuntime(764): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
08-20 19:31:59.545: E/AndroidRuntime(764): at android.os.Handler.dispatchMessage(Handler.java:99)
08-20 19:31:59.545: E/AndroidRuntime(764): at android.os.Looper.loop(Looper.java:137)
08-20 19:31:59.545: E/AndroidRuntime(764): at android.app.ActivityThread.main(ActivityThread.java:4424)
08-20 19:31:59.545: E/AndroidRuntime(764): at java.lang.reflect.Method.invokeNative(Native Method)
08-20 19:31:59.545: E/AndroidRuntime(764): at java.lang.reflect.Method.invoke(Method.java:511)
08-20 19:31:59.545: E/AndroidRuntime(764): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
08-20 19:31:59.545: E/AndroidRuntime(764): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
08-20 19:31:59.545: E/AndroidRuntime(764): at dalvik.system.NativeStart.main(Native Method)
08-20 19:31:59.545: E/AndroidRuntime(764): Caused by: java.lang.ClassNotFoundException: com.app.android.SplashActivity
08-20 19:31:59.545: E/AndroidRuntime(764): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
08-20 19:31:59.545: E/AndroidRuntime(764): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
08-20 19:31:59.545: E/AndroidRuntime(764): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
08-20 19:31:59.545: E/AndroidRuntime(764): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
08-20 19:31:59.545: E/AndroidRuntime(764): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
08-20 19:31:59.545: E/AndroidRuntime(764): ... 11 more
另请注意,我的 ABS 库很好。没有 jar 依赖错误和或类似的错误。总而言之,我在预编译过程中没有看到问题。仅抛出 RuntimeException。
谁能说可能是什么问题?