Android NDK java.lang.UnsatisfiedLinkError: findLibrary returned null

后端 未结 16 651
我在风中等你
我在风中等你 2020-11-30 01:56

Having the above error in your Android JNI app? Read on...

Up front, I\'ll say that I\'ve already solved this, in my own way, but I feel something in the Android bu

16条回答
  •  庸人自扰
    2020-11-30 02:18

    Add this following code inside your gradle file

    //libs is the location of your library's folder, It varies in diffarent projects like src/main/libs etc.
    android {
      sourceSets.main {
        jniLibs.srcDir 'libs'
      }
    }
    

    So, Android Studio keep on looking native libs inside jniLibs folder. this code will change the path of android studio to look libs in libs folder

提交回复
热议问题