How can I force Android Studio to build my app using the the updated NDK shared library (.so) file, without having to clean the entire project first?
There must be some mechanism by which Android Studio can detect that the shared library has been updated and to use the latest one. If I do a Build->Clean Project and then do a Run->Run 'app' it will use the new version of the library, but it will also have to do a lot of work that is unnecessary, since none of the java source has changed. Even a Run->Clean and Rerun'app' won't use the new library.(!!!)
Just checked that Android Studio perfectly detects changes of .so files and rebuilds app when they are changed and you are running the app. Make sure that you have latest Android Studio version and that your .so files are resided in directories
app/src/main/jniLibs/armeabi-v7a
app/src/main/jniLibs/x86
changing 'main' to your build configuration and armeabi-v7a, x86, .. to your supported architectures, if needed.
Also check that your changed .so files have newer modification time than old ones.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With