In Android development, if you upgrade the ADT to more than 17 (including 17), if your project references other third-party jar packages, the following error will be reported during running. This is because third-party packages will be put in a libs folder after adt17. If your third-party package (jar) is not put here, it will not be copied to during compilation. in the DEX file, the following error will be reported during running: Create a libs folder under your project and put the jar in the libs folder. This problem has been plagued for a long time, And adt16 has been used in development. Today we have finally found a solution.
08-09 09:58:06.259: W/dalvikvm(1277): Unable to resolve superclass of Lcom/demo/helloworld/widget/viewpagerindicator/simple/BaseSampleActivity; (107)08-09 09:58:06.259: W/dalvikvm(1277): Link of class 'Lcom/demo/helloworld/widget/viewpagerindicator/simple/BaseSampleActivity;' failed08-09 09:58:06.259: W/dalvikvm(1277): Unable to resolve superclass of Lcom/demo/helloworld/widget/viewpagerindicator/simple/SampleCirclesDefault; (451)08-09 09:58:06.259: W/dalvikvm(1277): Link of class 'Lcom/demo/helloworld/widget/viewpagerindicator/simple/SampleCirclesDefault;' failed08-09 09:58:06.259: D/AndroidRuntime(1277): Shutting down VM08-09 09:58:06.259: W/dalvikvm(1277): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)08-09 09:58:06.316: E/AndroidRuntime(1277): FATAL EXCEPTION: main08-09 09:58:06.316: E/AndroidRuntime(1277): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.demo.helloworld/com.demo.helloworld.widget.viewpagerindicator.simple.SampleCirclesDefault}: java.lang.ClassNotFoundException: com.demo.helloworld.widget.viewpagerindicator.simple.SampleCirclesDefault08-09 09:58:06.316: E/AndroidRuntime(1277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)08-09 09:58:06.316: E/AndroidRuntime(1277): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)08-09 09:58:06.316: E/AndroidRuntime(1277): at android.app.ActivityThread.access$600(ActivityThread.java:123)08-09 09:58:06.316: E/AndroidRuntime(1277): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)08-09 09:58:06.316: E/AndroidRuntime(1277): at android.os.Handler.dispatchMessage(Handler.java:99)08-09 09:58:06.316: E/AndroidRuntime(1277): at android.os.Looper.loop(Looper.java:137)08-09 09:58:06.316: E/AndroidRuntime(1277): at android.app.ActivityThread.main(ActivityThread.java:4424)08-09 09:58:06.316: E/AndroidRuntime(1277): at java.lang.reflect.Method.invokeNative(Native Method)08-09 09:58:06.316: E/AndroidRuntime(1277): at java.lang.reflect.Method.invoke(Method.java:511)08-09 09:58:06.316: E/AndroidRuntime(1277): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)08-09 09:58:06.316: E/AndroidRuntime(1277): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)08-09 09:58:06.316: E/AndroidRuntime(1277): at dalvik.system.NativeStart.main(Native Method)08-09 09:58:06.316: E/AndroidRuntime(1277): Caused by: java.lang.ClassNotFoundException: com.demo.helloworld.widget.viewpagerindicator.simple.SampleCirclesDefault08-09 09:58:06.316: E/AndroidRuntime(1277): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)08-09 09:58:06.316: E/AndroidRuntime(1277): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)08-09 09:58:06.316: E/AndroidRuntime(1277): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)08-09 09:58:06.316: E/AndroidRuntime(1277): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)08-09 09:58:06.316: E/AndroidRuntime(1277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)08-09 09:58:06.316: E/AndroidRuntime(1277): ... 11 more