在Android L预览上运行示例应用程序的例外情况

时间:2014-06-27 15:41:01

标签: android android-5.0-lollipop

我尝试从Android L预览sdk目录运行几个示例应用程序。 每当我在模拟器上运行或使用最新图像闪烁时,我都会收到以下异常。

06-27 11:33:12.627: E/AndroidRuntime(1071): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.elevationdrag/com.example.android.elevationdrag.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.android.elevationdrag.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.elevationdrag-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.elevationdrag-1, /vendor/lib, /system/lib]]
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2166)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2317)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.app.ActivityThread.access$800(ActivityThread.java:143)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1258)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.os.Handler.dispatchMessage(Handler.java:102)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.os.Looper.loop(Looper.java:135)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.app.ActivityThread.main(ActivityThread.java:5070)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at java.lang.reflect.Method.invoke(Native Method)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at java.lang.reflect.Method.invoke(Method.java:372)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)
06-27 11:33:12.627: E/AndroidRuntime(1071): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.android.elevationdrag.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.elevationdrag-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.elevationdrag-1, /vendor/lib, /system/lib]]
06-27 11:33:12.627: E/AndroidRuntime(1071):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.app.Instrumentation.newActivity(Instrumentation.java:1062)
06-27 11:33:12.627: E/AndroidRuntime(1071):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157)
06-27 11:33:12.627: E/AndroidRuntime(1071):     ... 10 more
06-27 11:33:12.627: E/AndroidRuntime(1071):     Suppressed: java.lang.ClassNotFoundException: com.example.android.elevationdrag.MainActivity
06-27 11:33:12.627: E/AndroidRuntime(1071):         at java.lang.Class.classForName(Native Method)
06-27 11:33:12.627: E/AndroidRuntime(1071):         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
06-27 11:33:12.627: E/AndroidRuntime(1071):         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
06-27 11:33:12.627: E/AndroidRuntime(1071):         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
06-27 11:33:12.627: E/AndroidRuntime(1071):         ... 13 more
06-27 11:33:12.627: E/AndroidRuntime(1071):     Caused by: java.lang.NoClassDefFoundError: Class "Lcom/example/android/elevationdrag/MainActivity;" not found

有人知道如何解决它吗?

0 个答案:

没有答案