0

There is some issue with android studio. My changes to the native code(library) are not getting effected on rebuild project. Following are the steps I am following.

  1. Remove the existing libraries (rm -r jniLibs/* rm -r obj/local/*)
  2. clean the project
  3. make the project.
  4. Run the app

I have to repeat the above steps 4 to 5 times and then my changes are seen. I am pretty sure I am missing something. Can you guys help me out if i need to change any configuration or something..

Here is the ndk command I am using..

ndk-build NDK_LIBS_OUT=./app/src/main/jniLibs

The above command is building my native code and is properly creating library in jniLibs folder. I am loading this library from my Java source code.

mk..
  • 15,357
  • 13
  • 60
  • 96
  • Have you tried `ndk-build clean` before building again? – Michael Aug 24 '16 at 10:32
  • @Michael No. I have not used that command. But i removed the obj/local/* and jniLibs/*. I will use it and will let you know the result. But i feel that the issue is with android studio. No? – mk.. Aug 24 '16 at 10:33
  • Well, you may have to add a gradle task to clean your native object/library files. [Here's an example](http://stackoverflow.com/a/26693354/1524450), but the exact syntax will depend on which version of the gradle plugin you're using. – Michael Aug 24 '16 at 10:37
  • @Michael Was checking the gradle system. My project is a bit complex and also I am used to Android.mk way... I dont want to invest time in reading about gradle at present.. So trying out the ndk-build way. Are the results so unpredictable? Sometime it includes and sometimes it doesn't. It is really irritating this way. – mk.. Aug 24 '16 at 10:42

0 Answers0