ndk-build

Android NDK build, Method could not be resolved

廉价感情. 提交于 2019-11-26 12:17:28
问题 I have an Android project with native code. I\'m able to build native code from command line by calling ndk-build command with no errors or warnings. But when I open it in ADT it shows the following error. Error message: Method CallStaticIntMethod could not be resolved. There are many files with similar errors in the project. I double checked configuration and here is what I have. Android build, tool chain and includes are properly configured (see pictures below) Required includes are also

How to use 32-bit native libraries on 64-bit Android device

我与影子孤独终老i 提交于 2019-11-26 03:37:09
问题 I use a native library in my application that is only compiled for armeabi, armeabi-v7a and x86. When this library is loaded on a 64-bit device like the Samsung S6, the application crashes with an UnsatisfiedLinkError java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file \"/data/app/com.myapp-2/base.apk\"],nativeLibraryDirectories=[/data/app/com.myapp-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn\'t find \"libfoo.so\" at java.lang.Runtime.loadLibrary