在用android studio 導入開源uvc項目時,編譯apk時會報錯
Process 'command '/root/Android/Sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2
網上很多人遇到,也有很多中解決方案,但是不一定和自己的配置一樣。
我的最終的androidstudio 配置如下:
Android Studio 3.5.2
Build #AI-191.8026.42.35.5977832, built on October 31, 2019
JRE: 1.8.0_202-release-1483-b03 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
ndk.dir=D\:\\SDK\\ndk-bundle\\android-ndk-r10e
sdk.dir=D\:\\SDK