问题
I used android-ndk-r13b, I downloaded it from Android website directly (not from SDK manager) and set the path from Project Structure in the Android Studio.
It able to detect my Android.mk and Application.mk (both in my jni folder), I saw it from console log. In my Application.mk, I define this : APP_ABI:=armeabi-v7a
But from the console log, I could see that everytime it execute ndk-build, there is always APP_ABI:=mips64 as the parameter. So, there is always an error. (I guess it is because of this wrong parameter, I got error "linker command failed...", because I compiled the .a and .so for armeabi-v7a not mips64)
So, I wonder what makes my Application.mk with APP_ABI defined is ignored ? (I already link the C++ to my gradle anyway)
I tried using: arguments "APP_ABI:=armeabi-v7a" in ndkBuild{} But it said, there is no method such as arguments()
did i miss something ?
回答1:
Found it ! Add this inside defaultConfig {} in app.gradle =>
ndk{abiFilters 'armeabi-v7a'}
来源:https://stackoverflow.com/questions/45603295/app-abi-ignored