ndk.dir error in Android Studio

前端 未结 3 726
遇见更好的自我
遇见更好的自我 2021-01-24 01:35

I was trying to use opencv library, so I imported one of its projects in Android Studio and when I tried to run it I got this error:

Error:Execution faile

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-24 02:17

    Install NDK in your SDK manager, if you already installed open app's "build.gradle" replace these lines

    sourceSets { main { jni.srcDirs = ['src/main/jni', 'src/main/jniLibs/', 'src/main/jni/'] } }
    

    to

    sourceSets.main { jniLibs.srcDir 'src/main/jniLibs' // mention your JNI lib path(where ".so" files contains) jni.srcDirs = [] //disable automatic ndk-build call }

    I'm tried to configure OpenCV and its fixed

提交回复
热议问题