/********************************************************************* * Android Standalone APK * Description: * Before using the APK is directly generated in the debug mode, the results do not know where the problem * debugging generated by the APK always reported the following error, and then create a separate apk to solve. * * 2017-8-8 Shenzhen Longhua gen Zengjianfeng ************************************************************** ******/First, error message: I/instantrun (26932): Starting instant Run Server: isMain process D/androidruntime (26932): Shutting down VM E/androidruntime (26932): FATAL exception:main E/androidruntime (26932): Process:com.android.aplex.wachendorffbringup, PID:269 +E/androidruntime (26932): Java.lang.RuntimeException:Unable to instantiate activity componentinfo{com.android.aplex.wachendorffbringup/ Com.android.aplex.wachendorffbringup.MainActivity}: Java.lang.ClassNotFoundException:Didn'T find class "com.android.aplex.wachendorffbringup.MainActivity" on Path:dexpathlist[[zip file "/data/app/ com.android.aplex.wachendorffbringup-1/base.apk "],nativelibrarydirectories=[/data/app/ Com.android.aplex.wachendorffbringup-1/lib/arm,/vendor/lib,/system/lib]]E/androidruntime (26932): At Android.app.ActivityThread.performLaunchActivity (Activitythread.java:2236) E/androidruntime (26932): At Android.app.ActivityThread.handleLaunchActivity (Activitythread.java:2387) E/androidruntime (26932): At android.app.activitythread.access$ -(Activitythread.java:151) E/androidruntime (26932): At Android.app.activitythread$h.handlemessage (Activitythread.java:1303) E/androidruntime (26932): At Android.os.Handler.dispatchMessage (Handler.java:102) E/androidruntime (26932): At Android.os.Looper.loop (Looper.java:135) E/androidruntime (26932): At Android.app.ActivityThread.main (Activitythread.java:5254) E/androidruntime (26932): At Java.lang.reflect.Method.invoke (Native Method) E/androidruntime (26932): At Java.lang.reflect.Method.invoke (Method.java:372) E/androidruntime (26932): at Com.android.Internal. os. Zygoteinit$methodandargscaller.run (Zygoteinit.java:903) E/androidruntime (26932): at Com.android.Internal. os. Zygoteinit.main (Zygoteinit.java:698) E/androidruntime (26932): Caused by:java.lang.ClassNotFoundException:Didn'T find class "com.android.aplex.wachendorffbringup.MainActivity" on Path:dexpathlist[[Zip file"/data/app/com.android.aplex.wachendorffbringup-1/base.apk"],nativelibrarydirectories=[/data/app/com.android.aplex.wachendorffbringup-1/lib/arm,/vendor/lib,/system/Lib]] E/androidruntime (26932): At Dalvik.system.BaseDexClassLoader.findClass (Basedexclassloader.java: About) E/androidruntime (26932): At Java.lang.ClassLoader.loadClass (Classloader.java:511) E/androidruntime (26932): At Java.lang.ClassLoader.loadClass (Classloader.java:469) E/androidruntime (26932): At Android.app.Instrumentation.newActivity (Instrumentation.java:1066) E/androidruntime (26932): At Android.app.ActivityThread.performLaunchActivity (Activitythread.java:2226) E/androidruntime (26932): ...TenMore E/androidruntime (26932): Suppressed:java.lang.ClassNotFoundException:com.android.aplex.wachendorffbringup.MainActivity E/androidruntime (26932): At Java.lang.Class.classForName (Native Method) E/androidruntime (26932): At Java.lang.BootClassLoader.findClass (Classloader.java:781) E/androidruntime (26932): At Java.lang.BootClassLoader.loadClass (Classloader.java:841) E/androidruntime (26932): At Java.lang.ClassLoader.loadClass (Classloader.java:504) E/androidruntime (26932): ... -More E/androidruntime (26932): caused By:java.lang.NoClassDefFoundError:Class not foundusingThe bootclassloader; no stack available W/activitymanager (401): Force finishing activity1com.android.aplex.wachendorffbringup/. Mainactivity I/openglrenderer (401): Initialized EGL, version1.4E/bufferqueueproducer (121): [Application Error:com.android.aplex.wachendorffbringup] Dequeuebuffer:can'T dequeue multiple buffers without setting the bufferCount W/activitymanager (401): Activity Pause Timeout forActivityrecord{7de90ed u0 com.android.aplex.wachendorffbringup/. Mainactivity t39 F} I/openglrenderer (1010): Initialized EGL, version1.4E/bufferqueueproducer (121): [Com.android.launcher/com.android.launcher2.launcher] Dequeuebuffer:can'T dequeue multiple buffers without setting the buffer couNT W/resourcetype (759): No package identifier when getting value forResource number0x00000000Second, the solution, separate production apk:
Android Standalone APK creation