Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Linking errors in NDK builds #1135

Open
saschaarthur opened this issue Apr 21, 2020 · 2 comments
Open

Linking errors in NDK builds #1135

saschaarthur opened this issue Apr 21, 2020 · 2 comments

Comments

@saschaarthur
Copy link

saschaarthur commented Apr 21, 2020

Firebase reports us linking errors:

Fatal Exception: java.lang.UnsatisfiedLinkError
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.xxx.mobile-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.mobile-1/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libNativeScript.so"

we are building our aabs with:

tns build android --release --key-store-path android.keystore --key-store-password ${KEYSTORE_PASSWORD} --key-store-alias keepa --key-store-alias-password ${KEYSTORE_PASSWORD} --env.aot --env.snapshot --env.compileSnapshot --env.uglify --env.report --env.hiddenSourceMap --aab

Our output looks fine:
output.log

Running on nativescript 6.4.1 (more infos about the env you see in the docker tag)

Builds are executed with our docker container (tag: 18.04-10.x-6.4.1-28.0.3-1.20.1-21.0.6113669):
https://hub.docker.com/r/scratchy/nativescript-cli

Please advice, we have a lot of issues with the build process and just released our first app with nativescript and have about 10% crashing devices - even if we dont see any critical output in any of the logs.
We disabled now aab builds because it seems the build process is not clean, hows this going we gonna see after a couple of days...

Related to
NativeScript/nativescript-cli#5298
#1134

@NathanaelA
Copy link

One thing that stood out in your output was:

�[33;1mThe provided Android NDK version is different than the required one - v21.0.6113669�[0m

You might double check which version of the NDK you are using.


However as to your error at the top;

Fatal Exception: java.lang.UnsatisfiedLinkError
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.xxx.mobile-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx.mobile-1/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libNativeScript.so"

Sounds like one of the .AAB's was possibly generated wrong; probably the x86 one based on the error -- which would only be a few devices using it as their are very few x86 android devices. You can try installing the x86 aab on a emulator and see what happens... Or you can open up the .aab file and verify it does have a libNativeScript.so in it.

@saschaarthur
Copy link
Author

We using exactly this version of the NDK which its complaining about what we should use.
Thanks will try your idears soon with opening the aab and check the x84 version

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants