4

I've got a JNI code in my Android project and it is included in Gradle file as following

   externalNativeBuild {
    cmake {
        path 'CMakeLists.txt'
    }
}

The code is compiled fine. *.so binaries are included in main APK and works great. But now I'm trying to add AndroidTest which would include testing code with uses JNI and I've got exception that native library is not loaded. I've checked that test APK doesn't include *.so binaries at all. Could you advise how I should change my Gradle file to include code generated in CMakeList in test APK as well?

Kir
  • 101
  • 1
  • 6
  • I found this question first, but it appears to be a duplicate of: https://stackoverflow.com/questions/16539684/loading-a-native-library-in-an-android-junit-test which has a wonderfully detailed answer. – mm2001 Feb 13 '22 at 11:28

0 Answers0