运行swipeview时出错

时间:2016-06-17 07:25:18

标签: android

我正在使用eclipse编写一个应用程序,可以在应用程序中刷过已保存的图像。当我运行它时,logcat给了我这些错误:

W/System(2438): ClassLoader referenced unknown path: /data/app/com.android.swipe-2/lib/x86
I/art(2438): Rejecting re-init on previously-failed class java.lang.Class<com.android.swipe.MainActivity>
D/AndroidRuntime(2438): Shutting down VM
E/AndroidRuntime(2438): FATAL EXCEPTION: main
E/AndroidRuntime(2438): Process: com.android.swipe, PID: 2438
E/AndroidRuntime(2438): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.swipe/com.android.swipe.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.android.swipe.MainActivity" on path: DexPathList[[zip file "/data/app/com.android.swipe-2/base.apk"],nativeLibraryDirectories=[/data/app/com.android.swipe-2/lib/x86, /vendor/lib, /system/lib]]
E/AndroidRuntime(2438):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
E/AndroidRuntime(2438):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
E/AndroidRuntime(2438):     at android.app.ActivityThread.-wrap11(ActivityThread.java)
E/AndroidRuntime(2438):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
E/AndroidRuntime(2438):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(2438):     at android.os.Looper.loop(Looper.java:148)
E/AndroidRuntime(2438):     at android.app.ActivityThread.main(ActivityThread.java:5417)
E/AndroidRuntime(2438):     at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(2438):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/AndroidRuntime(2438):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime(2438): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.swipe.MainActivity" on path: DexPathList[[zip file "/data/app/com.android.swipe-2/base.apk"],nativeLibraryDirectories=[/data/app/com.android.swipe-2/lib/x86, /vendor/lib, /system/lib]]
E/AndroidRuntime(2438):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime(2438):     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime(2438):     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
E/AndroidRuntime(2438):     at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
E/AndroidRuntime(2438):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
E/AndroidRuntime(2438):     ... 9 more
E/AndroidRuntime(2438):     Suppressed: java.lang.NoClassDefFoundError: com.android.swipe.MainActivity
E/AndroidRuntime(2438):         at dalvik.system.DexFile.defineClassNative(Native Method)
E/AndroidRuntime(2438):         at dalvik.system.DexFile.defineClass(DexFile.java:226)
E/AndroidRuntime(2438):         at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
E/AndroidRuntime(2438):         at dalvik.system.DexPathList.findClass(DexPathList.java:338)
E/AndroidRuntime(2438):         at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
E/AndroidRuntime(2438):         ... 13 more
E/AndroidRuntime(2438):     Suppressed: java.lang.ClassNotFoundException: com.android.swipe.MainActivity
E/AndroidRuntime(2438):         at java.lang.Class.classForName(Native Method)
E/AndroidRuntime(2438):         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
E/AndroidRuntime(2438):         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
E/AndroidRuntime(2438):         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
E/AndroidRuntime(2438):         ... 12 more
E/AndroidRuntime(2438):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

到目前为止,代码中几乎没有错误。

0 个答案:

没有答案