Cocos2dx Android APK failed to run on emulator

Source: Internet
Author: User

Issue: The payment SDK for a certain platform is now available to run on the real machine, but it does not start when it is running in the computer Simulator (bluestacks).

Error:

E/androidruntime (11861): FATAL exception:main
E/androidruntime (11861): Java.lang.ExceptionInInitializerError
E/androidruntime (11861):At Java.lang.Class.newInstanceImpl (Native Method)
E/androidruntime (11861):At Java.lang.Class.newInstance (class.java:1319)
E/androidruntime (11861):At Android.app.Instrumentation.newActivity (instrumentation.java:1025)
E/androidruntime (11861):At Android.app.ActivityThread.performLaunchActivity (activitythread.java:1871)
E/androidruntime (11861):At Android.app.ActivityThread.handleLaunchActivity (activitythread.java:1981)
E/androidruntime (11861):At android.app.activitythread.access$600 (activitythread.java:123)
E/androidruntime (11861):At Android.app.activitythread$h.handlemessage (activitythread.java:1147)
E/androidruntime (11861):At Android.os.Handler.dispatchMessage (handler.java:99)
E/androidruntime (11861):At Android.os.Looper.loop (looper.java:137)
E/androidruntime (11861):At Android.app.ActivityThread.main (activitythread.java:4424)
E/androidruntime (11861):At Java.lang.reflect.Method.invokeNative (Native Method)
E/androidruntime (11861):At Java.lang.reflect.Method.invoke (method.java:511)
E/androidruntime (11861):At Com.android.internal.os.zygoteinit$methodandargscaller.run (zygoteinit.java:825)
E/androidruntime (11861):At Com.android.internal.os.ZygoteInit.main (zygoteinit.java:592)
E/androidruntime (11861):At Dalvik.system.NativeStart.main (Native Method)
E/androidruntime (11861): caused by:java.lang.UnsatisfiedLinkError:Couldn ' t load Cocos2dlua:findlibrary returned NULL
E/androidruntime (11861):At Java.lang.Runtime.loadLibrary (runtime.java:365)
E/androidruntime (11861):At Java.lang.System.loadLibrary (system.java:535)
E/androidruntime (11861):At Com.zssbd.zjd.xxkapai.<clinit> (xxkapai.java:90)
E/androidruntime (11861):... More
I/activitymanager (981): Process (PID 11861) has died.


Solve:

1, the Internet received the information, some people said to check whether the dynamic library generated success, I looked under the apk inside, found that there is a dynamic library, the dynamic library is not a problem.

2, because the access to the SDK is more suitable for the architecture, in the Lib directory, contains the Armeabi,mips and x86 three architectures, so the APK package generated by my application side also contains the three kinds of


There are some dynamic libraries inside, but the two directories, MIPS and x86, do not have the dynamic libraries that our application generates.

3, on the real machine can run normally, but in the simulator will be error, not quite understand why?

4, because my application is just running on the Android platform, so I put them in the SDK, Lib under the MIPS and x86 these two files deleted, the result is ready.

Cocos2dx Android APK failed to run on emulator

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.