jxcore / jxcore-cordova

JXcore / Node.JS plugin for Apache Cordova / PhoneGap
Other
233 stars 68 forks source link

Does anyone know if jxcore-cordova works with Lenovo Tab 2 A10-70F? #112

Closed AlexZhouAA closed 8 years ago

AlexZhouAA commented 8 years ago

I tried this device and found jxcore.isReady function never got called.

However, all the same code works pretty well with Samsung Tab S & Asus ME173X.

The following is some details about the device: http://www.walmart.com/ip/Lenovo-ZA000001US-10-16gb-2-Gb-Android-4.4/44728585

Thanks in advance for any help

ktrzeciaknubisa commented 8 years ago

Since this is Android 4.4 you may try to debug the webview in chrome's inspector. Maybe you'll find something? A note on how I was able to do so is here: https://github.com/jxcore/jxcore-cordova/issues/7#issuecomment-121370015

AlexZhouAA commented 8 years ago

Thank you for your response, I already updated it to Android 5.0.1 Here are some debugging info,


I/ActivityManager(  623): Start proc com.does_inc.salesplus.server for activity com.does_inc.salesplus.server/.MainActivity: pid=4341 uid=10000 gids={50000, 9997, 1028, 1015, 3003, 3001, 3002} abi=arm64-v8a
I/libPerfService(  623): set_rootgroup - tid: 4341
V/SettingsInterface( 4341): invalidate [system]: current 7 != cached 0
D/ActivityManager(  623): getContentProviderImpl: from caller=android.app.ApplicationThreadProxy@14a8793 (pid=4341, userId=0) to get content provider settings cpr=ContentProviderRecord{356f19dd u0 com.android.providers.settings/.SettingsProvider}
D/ActivityThread( 4341): hoder:android.app.IActivityManager$ContentProviderHolder@16c5f07,provider,holder.Provider:andro
id.content.ContentProviderProxy@2682c834
D/Proxy   ( 4341): setHttpRequestCheckHandler
D/ActivityThread( 4341): BIND_APPLICATION handled : 0 / AppBindData{appInfo=ApplicationInfo{24d77bd2 com.does_inc.salesplus.server}}
V/ActivityThread( 4341): Handling launch of ActivityRecord{2de5e4a3 token=android.os.BinderProxy@f9e33a0 {com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity}}
V/ActivityThread( 4341): ActivityRecord{2de5e4a3 token=android.os.BinderProxy@f9e33a0 {com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity}}: app=android.app.Application@120d831e, appName=com.does_inc.salesplus.server,pkg=com.does_inc.salesplus.server, comp={com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity}, dir=/data/app/com.does_inc.salesplus.server-1/base.apk
I/WebViewFactory( 4341): Loading com.google.android.webview version 37 (1602158-arm) (code 111201)
I/LibraryLoader( 4341): Loading: webviewchromium
I/LibraryLoader( 4341): Time to load native libraries: 2 ms (timestamps 5392-5394)
I/LibraryLoader( 4341): Expected native library version number "",actual native library version number ""
D/WebView ( 4341): WebView
V/WebViewChromiumFactoryProvider( 4341): Binding Chromium to main looper Looper (main, tid 1) {27a1451b}
I/LibraryLoader( 4341): Expected native library version number "",actual native library version number ""
I/chromium( 4341): [INFO:library_loader_hooks.cc(106)] Chromium logging enabled: level = 0, default verbosity = 0
I/BrowserStartupController( 4341): Initializing chromium process, renderers=0
W/art     ( 4341): Attempt to remove local handle scope entry from IRT, ignoring
W/chromium( 4341): [WARNING:resource_bundle.cc(315)] locale_file_path.empty()
I/chromium( 4341): [INFO:aw_browser_main_parts.cc(63)] Load from apk succesful, fd=35 off=46784 len=2953
I/chromium( 4341): [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.pak from, fd:36 off:229540 len:643667
D/BluetoothAdapter( 4341): 278582968: getState() :  mService = null. Returning STATE_OFF
D/BluetoothAdapter( 4341): isEnabled
D/MALI    ( 4341): eglCreateContext:204: [MALI] eglCreateContext display:0x85160cc0 here.
D/MALI    ( 4341): eglCreateContext:500: [MALI] eglCreateContext end. Created context: 0x72788ec8 here.
D/MALI    ( 4341): eglDestroyContext:516: [MALI] eglDestroyContext display:0x85160cc0, context:0x72788ec8 here.
W/chromium( 4341): [WARNING:proxy_service.cc(901)] PAC support disabled because there is no system implementation
W/chromium( 4341): [WARNING:data_reduction_proxy_settings.cc(403)] SPDY proxy OFF at startup
I/SurfaceFlinger(  184): EventThread Client Pid (4341) created
W/art     ( 4341): Attempt to remove local handle scope entry from IRT, ignoring
W/AwContents( 4341): onDetachedFromWindow called when already detached. Ignoring
D/WebView ( 4341): setInitialScale=0
D/SystemWebViewEngine( 4341): CordovaWebView is running on device made by: LENOVO
D/WebView ( 4341): addJavascriptInterface=_cordovaNative
W/art     ( 4341): Attempt to remove local handle scope entry from IRT, ignoring
W/art     ( 4341): Attempt to remove local handle scope entry from IRT, ignoring
D/Environment( 4341): getStorageVolume,  volume:StorageVolume:
D/Environment( 4341):     mStorageId=65537 mPath=/storage/emulated/0 mDescriptionId=17040785
D/Environment( 4341):     mPrimary=true mRemovable=false mEmulated=true mMtpReserveSpace=10
D/Environment( 4341):     mAllowMassStorage=false mMaxFileSize=0 mOwner=UserHandle{0} mUuid=null
D/Environment( 4341):     mUserLabel=null mState=mounted
D/Environment( 4341): getStorageVolume,  volume:StorageVolume:
D/Environment( 4341):     mStorageId=131073 mPath=/storage/sdcard1 mDescriptionId=17040783
D/Environment( 4341):     mPrimary=false mRemovable=true mEmulated=false mMtpReserveSpace=0
D/Environment( 4341):     mAllowMassStorage=true mMaxFileSize=0 mOwner=null mUuid=9016-4EF8
D/Environment( 4341):     mUserLabel=MYSD mState=mounted
D/WebView ( 4341): loadUrl=file:///android_asset/www/index.html
V/ActivityThread( 4341): Performing resume of ActivityRecord{2de5e4a3 token=android.os.BinderProxy@f9e33a0 {com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity}}
D/WebView ( 4341): resumeTimers
D/ActivityThread( 4341): ACT-AM_ON_RESUME_CALLED ActivityRecord{2de5e4a3 token=android.os.BinderProxy@f9e33a0 {com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity}}
V/ActivityThread( 4341): Resume ActivityRecord{2de5e4a3 token=android.os.BinderProxy@f9e33a0 {com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity}} started activity: false, hideForNow: false, finished: false
V/PhoneWindow( 4341): DecorView setVisiblity: visibility = 4 ,Parent =null, this =com.android.internal.policy.impl.PhoneWindow$DecorView{22aeefce I.E..... R.....ID 0,0-0,0}
I/SurfaceFlinger(  184): EventThread Client Pid (4341) created
D/OpenGLRenderer( 4341): initialize DisplayEventReceiver 0x7f7fbad040
D/OpenGLRenderer( 4341): Render dirty regions requested: false
D/MPlugin ( 4341): createInstance(): Begin = 24955603
D/MPlugin ( 4341): create Instance (two parameters) with : com.mediatek.common.telephony.IOnlyOwnerSimSupport
D/MPlugin ( 4341): Clazz exists on mapping table : false
E/MPlugin ( 4341): Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport
D/MPlugin ( 4341): createInstance(): End = 24955603
D/GraphicBuffer( 4341): register, handle(0x7f70b30600) (w:768 h:768 s:768 f:0x1 u:0x000100)
D/Atlas   ( 4341): Validating map...
V/ActivityThread( 4341): Resuming ActivityRecord{2de5e4a3 token=android.os.BinderProxy@f9e33a0 {com.does_inc.salesplus.s
erver/com.does_inc.salesplus.server.MainActivity}} with isForward=true
V/PhoneWindow( 4341): DecorView setVisiblity: visibility = 0 ,Parent =ViewRoot{3375ece7 com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity,ident = 0}, this =com.android.internal.policy.impl.PhoneWindow$DecorView{22aeefce V.E..... R.....ID 0,0-0,0}
V/ActivityThread( 4341): Scheduling idle handler for ActivityRecord{2de5e4a3 token=android.os.BinderProxy@f9e33a0 {com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity}}
D/ActivityThread( 4341): ACT-LAUNCH_ACTIVITY handled : 0 / ActivityRecord{2de5e4a3 token=android.os.BinderProxy@f9e33a0{com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity}}
V/InputMethodManager( 4341): Not IME target window, ignoring
I/OpenGLRenderer( 4341): Initialized EGL, version 1.4
D/MALI    ( 4341): eglCreateContext:204: [MALI] eglCreateContext display:0x85160cc0 here.
D/MALI    ( 4341): eglCreateContext:500: [MALI] eglCreateContext end. Created context: 0x727c5a78 here.
D/OpenGLRenderer( 4341): Enabling debug mode 0
I/BufferQueueProducer(  184): [com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity](this:0x7f7d22f000,id:636,api:1,p:4341,c:184) connect(P): api=1 producer=(4341:com.does_inc.salesplus.server) producerControlledByApp=true
D/mali_winsys( 4341): new_window_surface returns 0x3000
V/InputMethodManager( 4341): onWindowFocus: org.apache.cordova.engine.SystemWebView{1142e9cc VFEDH.C. .F....ID 0,0-1920,1090 #64} softInputMode=272 first=true flags=#1810900
V/InputMethodManager( 4341): START INPUT: org.apache.cordova.engine.SystemWebView{1142e9cc VFEDH.C. .F....ID 0,0-1920,1090 #64} ic=com.android.org.chromium.content.browser.input.AdapterInputConnection@390e7094 tba=android.view.inputmethod.EditorInfo@17eb373d controlFlags=#105
D/ColorDrawable( 4341): Color = -16777216, canvas = android.view.GLES20RecordingCanvas@112a7083, mTintMode = SRC_IN, mTint = null, ColorDrawable = android.graphics.drawable.ColorDrawable@10294b32
E/libEGL  ( 4341): cache file failed CRC check
I/BufferQueueProducer(  184): [com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity](this:0x7f7d22f000,id:636,api:1,p:4341,c:184) new GraphicBuffer needed
D/GraphicBuffer( 4341): register, handle(0x7f4e157840) (w:1128 h:1920 s:1136 f:0x1 u:0x000b00)
E/AndroidProtocolHandler( 4341): Unable to open asset URL: file:///android_asset/www/jxcore.js
I/BufferQueueProducer(  184): [com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity](this:0x7f7d22f000,id:636,api:1,p:4341,c:184) new GraphicBuffer needed
D/GraphicBuffer( 4341): register, handle(0x7f34da90c0) (w:1128 h:1920 s:1136 f:0x1 u:0x000b00)
I/BufferQueueProducer(  184): [com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity](this:0x7f7d22f000,id:636,api:1,p:4341,c:184) new GraphicBuffer needed
D/GraphicBuffer( 4341): register, handle(0x7f34dfe660) (w:1128 h:1920 s:1136 f:0x1 u:0x000b00)
D/OpenGLRenderer( 4341): DisplayEventReceiver 0x7f7fbad040 requestNextVsync
D/OpenGLRenderer( 4341): DisplayEventReceiver 0x7f7fbad040 latestVsyncEvent 24955947185559
D/JsMessageQueue( 4341): Set native->JS mode to OnlineEventsBridgeMode
D/WebView ( 4341): setNetworkAvailable=true
D/MALI    ( 4341): eglCreateContext:204: [MALI] eglCreateContext display:0x85160cc0 here.
D/MALI    ( 4341): eglCreateContext:500: [MALI] eglCreateContext end. Created context: 0x34dacf38 here.
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/MALI    ( 4341): MTK_CheckAppName:68: appName=com.does_inc.salesplus.server, acAppName=com.android.gallery3d
D/MALI    ( 4341): MTK_CheckAppName:74: 0
D/Environment( 4341): getStorageVolume,  volume:StorageVolume:
D/Environment( 4341):     mStorageId=65537 mPath=/storage/emulated/0 mDescriptionId=17040785
D/Environment( 4341):     mPrimary=true mRemovable=false mEmulated=true mMtpReserveSpace=10
D/Environment( 4341):     mAllowMassStorage=false mMaxFileSize=0 mOwner=UserHandle{0} mUuid=null
D/Environment( 4341):     mUserLabel=null mState=mounted
D/Environment( 4341): getStorageVolume,  volume:StorageVolume:
D/Environment( 4341):     mStorageId=131073 mPath=/storage/sdcard1 mDescriptionId=17040783
D/Environment( 4341):     mPrimary=false mRemovable=true mEmulated=false mMtpReserveSpace=0
D/Environment( 4341):     mAllowMassStorage=true mMaxFileSize=0 mOwner=null mUuid=9016-4EF8
D/Environment( 4341):     mUserLabel=MYSD mState=mounted
W/System.err( 4341): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.does_inc.salesplus.server-1/base.apk"],nativeLibraryDirectories=[/data/app/com.does_inc.salesplus.server-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libjxcore.so"
W/System.err( 4341):    at java.lang.Runtime.loadLibrary(Runtime.java:366)
W/System.err( 4341):    at java.lang.System.loadLibrary(System.java:989)
W/System.err( 4341):    at io.jxcore.node.jxcore.(jxcore.java:29)
W/System.err( 4341):    at java.lang.Class.classForName(Native Method)
W/System.err( 4341):    at java.lang.Class.forName(Class.java:308)
W/System.err( 4341):    at java.lang.Class.forName(Class.java:272)
W/System.err( 4341):    at org.apache.cordova.PluginManager.instantiatePlugin(PluginManager.java:487)
W/System.err( 4341):    at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:167)
W/System.err( 4341):    at org.apache.cordova.PluginManager.exec(PluginManager.java:120)
W/System.err( 4341):    at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
W/System.err( 4341):    at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
W/System.err( 4341):    at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
W/System.err( 4341):    at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:28)
W/System.err( 4341):    at android.os.Handler.dispatchMessage(Handler.java:111)
W/System.err( 4341):    at android.os.Looper.loop(Looper.java:194)
W/System.err( 4341):    at android.os.HandlerThread.run(HandlerThread.java:61)
D/WebView ( 4341): setNetworkAvailable=false
I/art     ( 4341): Rejecting re-init on previously-failed class java.lang.Class
W/System.err( 4341): java.lang.UnsatisfiedLinkError: io.jxcore.node.jxcore
W/System.err( 4341):    at java.lang.Class.classForName(Native Method)
W/System.err( 4341):    at java.lang.Class.forName(Class.java:308)
W/System.err( 4341):    at java.lang.Class.forName(Class.java:272)
W/System.err( 4341):    at org.apache.cordova.PluginManager.instantiatePlugin(PluginManager.java:487)
W/System.err( 4341):    at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:167)
W/System.err( 4341):    at org.apache.cordova.PluginManager.exec(PluginManager.java:120)
W/System.err( 4341):    at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
W/System.err( 4341):    at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
W/System.err( 4341):    at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
W/System.err( 4341):    at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:28)
W/System.err( 4341):    at android.os.Handler.dispatchMessage(Handler.java:111)
W/System.err( 4341):    at android.os.Looper.loop(Looper.java:194)
W/System.err( 4341):    at android.os.HandlerThread.run(HandlerThread.java:61)
I/BufferQueueProducer(  184): [com.does_inc.salesplus.server/com.does_inc.salesplus.server.MainActivity](this:0x7f7d22f000,id:636,api:1,p:4341,c:184) queueBuffer: fps=4.20 dur=1189.77 max=629.98 min=8.39
I/chromium( 4341): [INFO:CONSOLE(1183)] "deviceready has not fired after 5 seconds.", source: file:///android_asset/www/cordova.js (1183)
I/chromium( 4341): [INFO:CONSOLE(1176)] "Channel not fired: onJXcoreReady", source: file:///android_asset/www/cordova.js (1176)

ktrzeciaknubisa commented 8 years ago

Is com.mediatek.common.telephony a plugin that you use?

E/MPlugin ( 4341): Unsupported class: com.mediatek.common.telephony.IOnlyOwnerSimSupport

I wonder if the problem is related with long app startup. Are you able to run any of the bundled samples to see if they run on the device? You may use jxc command for this.

AlexZhouAA commented 8 years ago

I tested the apk on Samsung & Asus devices, they're all doing well. com.mediatek.common.telephony does not come from a plugin. Since this device use MTK 8165 as its cpu made by mediatek, I think this class from the device itself. By the way this device runs 64-bit Android 5.0.1 system, I'd like to know whether cordova-jxcore supports 64-bit Android system or not?

Thanks for your patience.

AlexZhouAA commented 8 years ago

Where can I get a 64-bit version of libjxcore.so? I think that would solve the problem.

obastemur commented 8 years ago

@AlexZhouAA 64bit ARM or Intel ?

AlexZhouAA commented 8 years ago

64 bit ARM

obastemur commented 8 years ago

Sorry, I just saw it's ARM 64. JXcore would compile for 64bit ARM though but the regular fat binary doesn't have the bits for that. We also have some devices here with 64-bit SoC . None of them has the Android with 64 bit installed.

Adding 8Mb more on fat binary for 64Bit Android OS (maybe 0.00001% of the actual devices at max has that software installed) This is a bit tricky decision. However we should provide a way for you, so you can have this option anyway.

AlexZhouAA commented 8 years ago

That would be great! You're really a life saver.

I'm pretty sure the 64 bit android system will be more and more popular.

obastemur commented 8 years ago

See the instructions https://github.com/jxcore/jxcore/blob/master/doc/Android_Compile.md

AlexZhouAA commented 8 years ago

Thank you, I'll try it

AlexZhouAA commented 8 years ago

@obastemur : I followed your instruction to compile for 64 bit Android, but no luck. https://github.com/jxcore/jxcore/blob/master/doc/Android_Compile.md

If without "--embed-leveldown" presents, run "build_scripts/android_compile.sh ~/androidNDK/", I did "Compile as a Static Library" successfully. However, when I tried to run "~/android-ndk-path/ndk-build", I got error like


Android NDK: ERROR:/home/zhou/jxcore-cordova/src/android/jni/Android.mk:level: LOCAL_SRC_FILES points to a missing file    
Android NDK: Check that /home/zhou/jxcore-cordova/src/android/jni/../jxcore-binaries/libleveldb_arm.a exists  or that its path is correct   
/home/zhou/Downloads/androidNDK/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.

I realized I have to compile with "--embed-leveldown", and then got the following,


mkdir: cannot create directory ‘out_arm64_droid’: File exists
mkdir: cannot create directory ‘out_arm_droid’: File exists
mkdir: cannot create directory ‘out_x64_droid’: File exists
mkdir: cannot create directory ‘out_ia32_droid’: File exists
mkdir: cannot create directory ‘out_android’: File exists
Compiling Android ARM64

creating  ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'OS': 'android',
                 'android_ndk_root': '/home/zhou/androidNDK/',
                 'clang': 0,
                 'gcc_version': 49,
                 'host_arch': 'ia32',
                 'icu_small': 'false',
                 'node_compress_internals': 0,
                 'node_embed_leveldown': 1,
                 'node_engine_chakra': 0,
                 'node_engine_mozilla': 1,
                 'node_engine_v8': 0,
                 'node_install_npm': 'true',
                 'node_no_sqlite': 0,
                 'node_prefix': '',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_library': 0,
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_static_library': 1,
                 'node_tag': '',
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_mdb': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'openssl_no_asm': 0,
                 'python': '/usr/bin/python',
                 'target_arch': 'arm64',
                 'uclibc_defined': 0,
                 'use_system_icu%': 1,
                 'uv_library': 'static_library',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 0,
                 'v8_is_3_14': 0,
                 'v8_is_3_28': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_optimized_debug': 0,
                 'v8_random_seed': 0,
                 'v8_use_snapshot': 'true',
                 'want_separate_host_toolset': 1}}
creating  ./config.gypi
creating  ./config.mk
gyp: /home/zhou/jxcore/deps/leveldown-mobile/leveldown_embedded.gyp not found (cwd: /home/zhou/jxcore) while loading dependencies of /home/zhou/jxcore/jx.gyp while trying to load /home/zhou/jxcore/jx.gyp
Error running GYP
compilation aborted for arm64 target

I noticed the folder leveldown-mobile is empty. Finally I found this link, https://github.com/jxcore/jxcore/issues/658 I copied all things from leveldown-mobile/tree/791effbccf114ec5b449aa467fe451098ed7da86 to jxcore/deps/leveldown-mobile/ and ran "build_scripts/android_compile.sh ~/androidNDK/ --embed-leveldown" again. This time I got,


mkdir: cannot create directory ‘out_arm64_droid’: File exists
mkdir: cannot create directory ‘out_arm_droid’: File exists
mkdir: cannot create directory ‘out_x64_droid’: File exists
mkdir: cannot create directory ‘out_ia32_droid’: File exists
mkdir: cannot create directory ‘out_android’: File exists
Compiling Android ARM64

creating  ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'OS': 'android',
                 'android_ndk_root': '/home/zhou/androidNDK/',
                 'clang': 0,
                 'gcc_version': 49,
                 'host_arch': 'ia32',
                 'icu_small': 'false',
                 'node_compress_internals': 0,
                 'node_embed_leveldown': 1,
                 'node_engine_chakra': 0,
                 'node_engine_mozilla': 1,
                 'node_engine_v8': 0,
                 'node_install_npm': 'true',
                 'node_no_sqlite': 0,
                 'node_prefix': '',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_library': 0,
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_static_library': 1,
                 'node_tag': '',
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_mdb': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'openssl_no_asm': 0,
                 'python': '/usr/bin/python',
                 'target_arch': 'arm64',
                 'uclibc_defined': 0,
                 'use_system_icu%': 1,
                 'uv_library': 'static_library',
                 'v8_enable_gdbjit': 0,
                 'v8_enable_i18n_support': 0,
                 'v8_is_3_14': 0,
                 'v8_is_3_28': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_optimized_debug': 0,
                 'v8_random_seed': 0,
                 'v8_use_snapshot': 'true',
                 'want_separate_host_toolset': 1}}
creating  ./config.gypi
creating  ./config.mk
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory '/home/zhou/jxcore/out'
  aarch64-linux-android-g++ '-D_GLIBCXX_USE_C99_MATH' '-DANDROID' '-DSNAPPY=1' '-DLEVELDB_PLATFORM_POSIX=1' '-DOS_LINUX=1' '-DOS_ANDROID' '-DLEVELDB_PLATFORM_ANDROID' -I../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0 -I../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/include -I../deps/leveldown-mobile/deps/snappy/snappy-1.1.1  -Wall -Wextra -Wno-unused-parameter -std=c++0x -Wno-sign-compare -Wno-unused-but-set-variable -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /home/zhou/jxcore/out/Release/.deps//home/zhou/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/builder.o.d.raw  -c -o /home/zhou/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/builder.o ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/builder.cc
  aarch64-linux-android-g++ '-D_GLIBCXX_USE_C99_MATH' '-DANDROID' '-DSNAPPY=1' '-DLEVELDB_PLATFORM_POSIX=1' '-DOS_LINUX=1' '-DOS_ANDROID' '-DLEVELDB_PLATFORM_ANDROID' -I../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0 -I../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/include -I../deps/leveldown-mobile/deps/snappy/snappy-1.1.1  -Wall -Wextra -Wno-unused-parameter -std=c++0x -Wno-sign-compare -Wno-unused-but-set-variable -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF /home/zhou/jxcore/out/Release/.deps//home/zhou/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.o.d.raw  -c -o /home/zhou/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.o ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc
In file included from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/port/port_posix.h:50:0,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/port/port.h:16,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/filename.h:14,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/builder.cc:7:
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/port/atomic_pointer.h:212:2: error: #error Please implement AtomicPointer for this platform.
 #error Please implement AtomicPointer for this platform.
  ^
In file included from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/port/port_posix.h:50:0,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/port/port.h:16,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/util/coding.h:17,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/dbformat.h:14,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.h:10,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:5:
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/port/atomic_pointer.h:212:2: error: #error Please implement AtomicPointer for this platform.
 #error Please implement AtomicPointer for this platform.
  ^
In file included from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:5:0:
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.h:138:9: error: 'AtomicPointer' in namespace 'leveldb::port' does not name a type
   port::AtomicPointer shutting_down_;
         ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.h:142:9: error: 'AtomicPointer' in namespace 'leveldb::port' does not name a type
   port::AtomicPointer has_imm_;  // So bg thread can detect non-NULL imm_
         ^
deps/leveldown-mobile/deps/leveldb/leveldb.target.mk:126: recipe for target '/home/zhou/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/builder.o' failed
make[1]: *** [/home/zhou/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/builder.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/memtable.h:11:0,
                 from ../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:19:
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:105:9: error: 'AtomicPointer' in namespace 'leveldb::port' does not name a type
   port::AtomicPointer max_height_;   // Height of the entire list
         ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: In member function 'int leveldb::SkipList::GetMaxHeight() const':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:109:36: error: 'max_height_' was not declared in this scope
         reinterpret_cast(max_height_.NoBarrier_Load()));
                                    ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: At global scope:
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:176:9: error: 'AtomicPointer' in namespace 'leveldb::port' does not name a type
   port::AtomicPointer next_[1];
         ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: In member function 'leveldb::SkipList::Node* leveldb::SkipList::Node::Next(int)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:155:36: error: 'next_' was not declared in this scope
     return reinterpret_cast(next_[n].Acquire_Load());
                                    ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: In member function 'void leveldb::SkipList::Node::SetNext(int, leveldb::SkipList::Node*)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:161:5: error: 'next_' was not declared in this scope
     next_[n].Release_Store(x);
     ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: In member function 'leveldb::SkipList::Node* leveldb::SkipList::Node::NoBarrier_Next(int)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:167:36: error: 'next_' was not declared in this scope
     return reinterpret_cast(next_[n].NoBarrier_Load());
                                    ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: In member function 'void leveldb::SkipList::Node::NoBarrier_SetNext(int, leveldb::SkipList::Node*)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:171:5: error: 'next_' was not declared in this scope
     next_[n].NoBarrier_Store(x);
     ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: In member function 'leveldb::SkipList::Node* leveldb::SkipList::NewNode(const Key&, int)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:183:29: error: 'AtomicPointer' is not a member of 'leveldb::port'
       sizeof(Node) + sizeof(port::AtomicPointer) * (height - 1));
                             ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: In constructor 'leveldb::SkipList::SkipList(Comparator, leveldb::Arena*)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:326:7: error: class 'leveldb::SkipList' does not have any field named 'max_height_'
       max_height_(reinterpret_cast(1)),
       ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h: In member function 'void leveldb::SkipList::Insert(const Key&)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/skiplist.h:357:5: error: 'max_height_' was not declared in this scope
     max_height_.NoBarrier_Store(reinterpret_cast(height));
     ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In constructor 'leveldb::DBImpl::DBImpl(const leveldb::Options&, const string&)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:126:7: error: class 'leveldb::DBImpl' does not have any field named 'shutting_down_'
       shutting_down_(NULL),
       ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:138:3: error: 'has_imm_' was not declared in this scope
   has_imm_.Release_Store(NULL);
   ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In destructor 'virtual leveldb::DBImpl::~DBImpl()':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:151:3: error: 'shutting_down_' was not declared in this scope
   shutting_down_.Release_Store(this);  // Any non-NULL value is ok
   ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In member function 'void leveldb::DBImpl::CompactMemTable()':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:514:17: error: 'shutting_down_' was not declared in this scope
   if (s.ok() && shutting_down_.Acquire_Load()) {
                 ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:529:5: error: 'has_imm_' was not declared in this scope
     has_imm_.Release_Store(NULL);
     ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In member function 'void leveldb::DBImpl::TEST_CompactRange(int, const leveldb::Slice*, const leveldb::Slice*)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:576:27: error: 'shutting_down_' was not declared in this scope
   while (!manual.done && !shutting_down_.Acquire_Load() && bg_error_.ok()) {
                           ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In member function 'void leveldb::DBImpl::MaybeScheduleCompaction()':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:618:14: error: 'shutting_down_' was not declared in this scope
   } else if (shutting_down_.Acquire_Load()) {
              ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In member function 'void leveldb::DBImpl::BackgroundCall()':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:639:7: error: 'shutting_down_' was not declared in this scope
   if (shutting_down_.Acquire_Load()) {
       ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In member function 'void leveldb::DBImpl::BackgroundCompaction()':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:718:14: error: 'shutting_down_' was not declared in this scope
   } else if (shutting_down_.Acquire_Load()) {
              ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In member function 'leveldb::Status leveldb::DBImpl::DoCompactionWork(leveldb::DBImpl::CompactionState*)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:884:29: error: 'shutting_down_' was not declared in this scope
   for (; input->Valid() && !shutting_down_.Acquire_Load(); ) {
                             ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:886:9: error: 'has_imm_' was not declared in this scope
     if (has_imm_.NoBarrier_Load() != NULL) {
         ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:978:22: error: 'shutting_down_' was not declared in this scope
   if (status.ok() && shutting_down_.Acquire_Load()) {
                      ^
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc: In member function 'leveldb::Status leveldb::DBImpl::MakeRoomForWrite(bool)':
../deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.cc:1339:7: error: 'has_imm_' was not declared in this scope
       has_imm_.Release_Store(imm_);
       ^
deps/leveldown-mobile/deps/leveldb/leveldb.target.mk:126: recipe for target '/home/zhou/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.o' failed
make[1]: *** [/home/zhou/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.o] Error 1
make[1]: Leaving directory '/home/zhou/jxcore/out'
Makefile:45: recipe for target 'jx' failed
make: *** [jx] Error 2
compilation aborted for arm64 target

Now I have no idea what to do. What I did wrong?

Thanks

obastemur commented 8 years ago

@AlexZhouAA are you using LevelDB with your app ?

AlexZhouAA commented 8 years ago

No, I don't. I tried to run ~/android-ndk-path/ndk-build to update JXCORE binaries, I got error


ova/src/android/jni/Android.mk:level: LOCAL_SRC_FILES points to a missing file    
Android NDK: Check that /home/zhou/jxcore-cordova/src/android/jni/../jxcore-binaries/libleveldb_arm.a exists  or that its path is correct   
/home/zhou/Downloads/androidNDK/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.

This error should have nothing to do with my app.

obastemur commented 8 years ago

See https://github.com/jxcore/jxcore-cordova/tree/master/src/android There are two build scripts. One with leveldown and another without. Gonna take care of the leveldown android ARM64 issue anyways. Thanks for reporting it.

AlexZhouAA commented 8 years ago

Thanks, I'll try the one without leveldown.

ktrzeciaknubisa commented 8 years ago

Me too I have

make[1]: *** [/Users/nubisa_krzs/Documents/GitHub/jxcore/out/Release/obj.target/leveldb/deps/leveldown-mobile/deps/leveldb/leveldb-1.17.0/db/db_impl.o] Error 1
make: *** [jx] Error 2
compilation aborted for arm64 target

when running

sudo ./build_scripts/android_compile.sh ~/android-ndk-r10d --embed-leveldown

with arm64 enabled:

# android_compile.sh
ARM64=out_arm64_droid
AlexZhouAA commented 8 years ago

@obastemur One more question, When I run ~/android-ndk-path/ndk-build, how can I choose build_default.sh instead of build_leveldown.sh?

Thanks

ktrzeciaknubisa commented 8 years ago

@AlexZhouAA Just run one either build_default.sh or build_leveldown.sh. It calls ndk-build. However I needed to use something like this to make it work:

export PATH=$PATH:/Users/nubisa_krzs/android-ndk-r10d/
./build_leveldown.sh /Users/nubisa_krzs/Documents/GitHub/jxcore/out_android/android/bin

But you need to have android binaries compiled first. The above path [...]/out_android/android/bin is my result of:

sudo ./build_scripts/android_compile.sh ~/android-ndk-r10d --embed-leveldown
AlexZhouAA commented 8 years ago

@ktrzeciaknubisa Thanks, I'll try that.

AlexZhouAA commented 8 years ago

Now I ran ~/android-ndk-path/ndk-build successfully, but there're nothing related to arm64 generated under folder jxcore-cordova/src/android/libs .

I checked folder under jxcore-cordova/src/android/jxcore-binaries, there're lots of file named as *_arm64.a

I also examined the file jxcore-cordova/src/android/jni/android.mk, there're no statements related to arm64. Is this the reason that caused no arm64 *.so generated?

AlexZhouAA commented 8 years ago

I ran $> build_scripts/android-configure.sh ~/androidNDK/ created android-toolchain and android-toolchain-intel.

Modified build_scripts/android_compile.sh as following, ARM64=out_arm64_droid After ran $> build_scripts/android_compile.sh ~/androidNDK/ I successfully build jxcore as arm64 static library.

And then I followed below to update jxcore binaries of jxcore-cordova, https://github.com/jxcore/jxcore-cordova#updating-jxcore-binaries-optional Everything went smoothly, no errors reported.

I got three folders generated under folder jxcore-cordova/src/android/libs


libs
    +armeabi
    +armeabi-v7a
    +x86

No folder like arm64-v8a or x86_64 appears.

What I did wrong? How can I apply arm64 static library to jxcore-cordova?

I appreciate all the help from obastemur and ktrzeciaknubisa I can tell it's pretty close to success, please help

AlexZhouAA commented 8 years ago

After I applied the newly compiled .so files to jxcore-cordova, and re-added the plugin, My app is up and running on the 64 bit android device.

Thanks for all the help, very appreciated

obastemur commented 8 years ago

@AlexZhouAA It could be really nice if you can contribute a basic how to tutorial on this.

AlexZhouAA commented 8 years ago

I really did nothing more than the instructions you guys provide. If you think it may benefit others, I'd be very glad to share what I did.

  1. Download jxcore and create android toolchain

    ~$ git clone https://github.com/jxcore/jxcore
    ~$ cd jxcore
    ~$ build_scripts/android-configure.sh ~/Downloads/androidNDK/
    
  2. Refer to this link to compile jxcore as a arm64 enabled static library. I chose the one without the switch --embed-leveldown
  3. Download jxcore-cordova and update JXcore binaries, run the following,

    ~$ git clone https://github.com/jxcore/jxcore-cordova.git
    ~$ mkdir ~/jxcore-cordova/src/android/jxcore-binaries
    ~$ cp -f /jxcore/out_android/android/bin/* jxcore-cordova/src/android/jxcore-binaries/
    
  4. Recompile .so files

    ~$ cd jxcore-cordova/src/android/jni
    ~$ ~/Downloads/androidNDK/ndk-build
    

    If ndk-build complaints the below things,

    Android NDK: ERROR:/home/zhou/jxcore-cordova/src/android/jni/Android.mk:level: LOCAL_SRC_FILES points to a missing file    
    Android NDK: Check that /home/zhou/jxcore-cordova/src/android/jni/../jxcore-binaries/libleveldb_arm.a exists  or that its path is correct   
    /home/zhou/Downloads/androidNDK/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting 
    

    I think ndk-build calls jxcore-cordova/src/android/build_leveldown.sh by default. I don't know how to change that. As a workaround, here is what I did,

    Rename file  jxcore-cordova/src/android/build_leveldown.sh to something else
    Rename file Rename jxcore-cordova/src/android/build_default.sh to jxcore-cordova/src/android/build_leveldown.sh
    

    And then run again,

    ~$ ~/Downloads/androidNDK/ndk-build
    
  5. Re-add the plugin, copy the updated jxcore-cordova to the root path of your app
    ~$ cd root-path-of-your-app
    ~$ cordova plugin rm io.jxcore.node
    ~$ cordova plugin add jxcore-cordova/