1

I am struggling with using Dropbox (Sync API) and Andengine in the same android app. Both are using native libraries and, as far as I know, Andengine is developed for ARMv7a and Dropbox for ARM systems. Running each part of the application on its own, everything works fine. However, combining both parts results in a: java.lang.UnsatisfiedLinkError: Couldn't load DropboxSync: findLibrary returned null.

It seems that only the armeabi-v7a folder is checked for the library as soon as this folder is present? However, the libDropboxSync.so is only located in the armeabi folder.

Everything is tested with a Nexus S running Android 4.1.2.

Thanks in advance,
Stefan

auselen
  • 27,577
  • 7
  • 73
  • 114
Stefan
  • 11
  • 1
  • 2
  • See [armeabi-v7a vs armeabi](http://stackoverflow.com/questions/7080525/why-use-armeabi-v7a-code-over-armeabi-code). You can not mix and match the two. You have a **multi-lib** installation, so need *dropbox* compiled from *v7a*. It is possible to write **shims** allowing inter-operate. I guess the Android loader is not supporting this. The **shims** maybe highly in-efficient, storing floating point registers when it isn't needed, etc. Also, [harware floating point](http://stackoverflow.com/questions/15998609/how-to-tell-the-compiler-to-use-hardware-floating-point-instructions-with-arm). – artless noise Apr 19 '13 at 13:50

2 Answers2

1

From $NDK/docs/CPU-ARCH-ABIS.html: if primary-abi is found secondary won't be scanned.

III.3. Automatic extraction of native code at install time:
-----------------------------------------------------------

When installing an application, the package manager service will scan
the .apk and look for any shared library of the form:

     lib/<primary-abi>/lib<name>.so

If one is found, then it is copied under $APPDIR/lib/lib<name>.so,
where $APPDIR corresponds to the application's specific data directory.

If none is found, and a secondary ABI is defined, the service will
then scan for shared libraries of the form:

You can check this by;

$ adb shell getprop|grep abi
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abi]: [armeabi-v7a]

as you can see primary abi is more specific then the secondary one.

Solution-wise you can move armv5 library under armv7-a. It should work, but it will be only visible to such devices under Google Play.

auselen
  • 27,577
  • 7
  • 73
  • 114
0

Check out the 3rd and 4th point

  1. Within Android Studio, switch to the "project view".
  2. From the libs directory in the downloaded SDK, drag dropbox-sync-sdk-android.jar into your project's app/libs directory.
  3. Right-click on dropbox-sync-sdk-android.jar and choose "Add as library". Click "OK" on the dialog that appears.
  4. Make a new directory in your project under app/src/main called jniLibs. From the SDK, drag armeabi, armeabi-v7a, mips, and x86 into the new jniLibs directory.
Nabin
  • 11,216
  • 8
  • 63
  • 98