Tegra Development Pack NDK UnsatisfiedLinkError

716 views Asked by At

I'm really stuck. I previously installed the Tegra Development Pack and it was all working flawlessly. All of the samples built and ran with no errors. I messed around with the samples a little too much and they stopped working. I didn't have a backup so I decided that the easiest option would be to uninstall the Tegra Development Pack and reinstall it. Since reinstalling it, I am unable to get the samples to work.

Here is what the console outputs:

09:56:57 **** Incremental Build of configuration Default for project OpenCV Sample - face-detection ****
/bin/bash /ndk-build NDK_DEBUG=1 V=1 
/bin/bash: /ndk-build: No such file or directory

09:56:57 Build Finished (took 81ms)

My build path is set to what the Pack set itself to: ${CYGWIN_HOME}/bin/bash

If I directly point to ndk-build: /Users/jordan/NVPACK/android-ndk-r8d

10:04:56 **** Incremental Build of configuration Default for project OpenCV Sample - face-detection ****
/Users/jordan/NVPACK/android-ndk-r8d /ndk-build NDK_DEBUG=1 V=1 

10:04:56 Build Finished (took 87ms)

I then clear & build all projects. However the error is still present.

OpenCV Manager is correctly installed on my device. I can verify this is correct because if I install the Face-Detection APK that I built previously from the sample, it runs.

I don't understand why it worked previously but not now considering that I haven't changed anything?

Here is the LogCat output:

08-15 09:12:26.613: E/AndroidRuntime(8401): FATAL EXCEPTION: main
08-15 09:12:26.613: E/AndroidRuntime(8401): java.lang.UnsatisfiedLinkError: Couldn't load detection_based_tracker from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.opencv.samples.facedetect-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.opencv.samples.facedetect-1, /vendor/lib, /system/lib]]]: findLibrary returned null
08-15 09:12:26.613: E/AndroidRuntime(8401):     at java.lang.Runtime.loadLibrary(Runtime.java:355)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at java.lang.System.loadLibrary(System.java:525)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at org.opencv.samples.facedetect.FdActivity$1.onManagerConnected(FdActivity.java:66)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at org.opencv.android.AsyncServiceHelper$1.onServiceConnected(AsyncServiceHelper.java:318)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1106)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1123)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at android.os.Handler.handleCallback(Handler.java:730)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at android.os.Handler.dispatchMessage(Handler.java:92)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at android.os.Looper.loop(Looper.java:137)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at android.app.ActivityThread.main(ActivityThread.java:5103)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at java.lang.reflect.Method.invokeNative(Native Method)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at java.lang.reflect.Method.invoke(Method.java:525)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-15 09:12:26.613: E/AndroidRuntime(8401):     at dalvik.system.NativeStart.main(Native Method)

I would greatly appreciate any help offered in getting this working again.

Edit: OS X 10.8.4 - Nexus 4 on 4.3 & Xperia SP on 4.1.2

I'm going to try installing the Tegra Development Pack on to my XP Virtual Machine next.

Update: Works flawlessly again on my XP Virtual Machine. At least now I can continue my work.

1

There are 1 answers

0
Xuan Wang On

Looks for whatever reason, you don't have the NDKROOT point to the ndk path when you launched eclipse.

Check: 1. Whether you installed ndk by TADP. 2. Check ~/.MacOSX/environment.plist (open by xcode), ~/.bash_profile, ~/.bash_rc. The TADP installer shoud write the variable NDKROOT for you, in those files.