Bug #4800
closedNFD-android built from source crashes on startup
0%
Description
After building NFD-android from source master branch with no changes, the debug APK is deployed to my device without and is started automatically. It crashes every time with the below error. This is where it is trying to load "all shared library dependencies that are located in app's lib folder". I can see there is no app/src/main/libs folder in the source code however according to this tutorial (https://named-data.net/tutorials/milcom2017/milcom2017-ndn-3-codebase.pdf) page 7, the folder and ultimately the missing libnfd-wrapper.so file should exist. What is going wrong here?
2019-01-07 10:27:30.503 9884-9884/net.named_data.nfd.service.NfdService E/AndroidRuntime: FATAL EXCEPTION: main
Process: net.named_data.nfd.service.NfdService, PID: 9884
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/net.named_data.nfd-vw5BHc4SFN2nXrU_qjPNyg==/base.apk"],nativeLibraryDirectories=[/data/app/net.named_data.nfd-vw5BHc4SFN2nXrU_qjPNyg==/lib/arm, /system/lib, /vendor/lib]]] couldn't find "libnfd-wrapper.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
at net.named_data.nfd.service.NfdService.<clinit>(NfdService.java:91)
at java.lang.Class.newInstance(Native Method)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3484)
at android.app.ActivityThread.-wrap4(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1734)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6694)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
Updated by Ciaran O'Driscoll-Collins over 5 years ago
After building NFD-android from source master branch with no changes, the debug APK is deployed to my device and is started automatically. It crashes every time with the below error. This is where it is trying to load "all shared library dependencies that are located in app's lib folder". I can see there is no app/src/main/libs folder in the source code however according to this tutorial (https://named-data.net/tutorials/milcom2017/milcom2017-ndn-3-codebase.pdf) page 7, the folder and ultimately the missing libnfd-wrapper.so file should exist. What is going wrong here?
2019-01-07 10:27:30.503 9884-9884/net.named_data.nfd.service.NfdService E/AndroidRuntime: FATAL EXCEPTION: main
Process: net.named_data.nfd.service.NfdService, PID: 9884
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathListzip file "/data/app/net.named_data.nfd-vw5BHc4SFN2nXrU_qjPNyg==/base.apk"],nativeLibraryDirectories=[/data/app/net.named_data.nfd-vw5BHc4SFN2nXrU_qjPNyg==/lib/arm, /system/lib, /vendor/lib] couldn't find "libnfd-wrapper.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
at net.named_data.nfd.service.NfdService.(NfdService.java:91)
at java.lang.Class.newInstance(Native Method)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3484)
at android.app.ActivityThread.-wrap4(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1734)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6694)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
Updated by Davide Pesavento over 5 years ago
- Subject changed from NFD-android crashes on startup to NFD-android built from source crashes on startup
- Description updated (diff)
- Start date deleted (
01/07/2019)
Updated by Ciaran O'Driscoll-Collins over 5 years ago
Error diagnosed by user 'Diarmuid Ó Coileáin':
The linking of the platform libraries was not completed correctly. These two steps from the NFD-android prerequisites (https://github.com/named-data-mobile/NFD-android#prerequisites) needed to be performed again:
echo "y" | sdkmanager "platform-tools"
sdkmanager "platforms;android-28" "ndk-bundle"
Issue can be closed.
Updated by Davide Pesavento over 5 years ago
- Status changed from New to Rejected
- Priority changed from High to Normal