node-on-android: libnode.so for 32 bit is missing
okay it looks like I got it installed, it says it built successfully, but when I tried to run it on my phone I got this error:
Error:error: '../../../../src/main/jniLibs/armeabi-v7a/libnode.so', needed by '../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libnative-lib.so', missing and no known rule to make it
I’m trying to figure out where libnode.so comes from? okay, a bit of searching led me here: https://github.com/nodejs/node/issues/14158
gonna check that out…
btw, I changed line 14 of app/build.gradle
to
abiFilters 'armeabi-v7a', 'arm64-v8a'
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 23 (1 by maintainers)
https://github.com/sjitech/nodejs-android-prebuilt-binaries
https://github.com/sjitech/build-nodejs-for-android
Hi - I managed to compile a version of node (from master - 9.0.0?) on a Samsung Galaxyy Tab A SM-T280 tablet running Android 5.1.1 Cortex A7 CPU - it is armeabi-v7a, compiled via termux.
Here is my commit with the shared lib if anyone needs it. I followed @mafintosh’s steps to create the node shared lib.
https://github.com/bunsenbrowser/cordova-node-plugin/commit/bb8969098537e46a1ea0294fb95102cbe1168a57
I haven’t been able to test it correctly - I think I also may need to make the other shared lib - libc++_shared.so - but haven’t had a chance to figure out that process.
Thanks a lot to @mafintosh for leading the way for node on android and to @aschrijver for his perseverence and extremely useful list of the many ways to try to compile node on android.
Here are my notes - they are based on the steps @mafintosh made above:
hmm, so node has an
android-configure
script, with this comment at the top:so this seemed to work:
remember to include “–shared” so that it becomes a shared object