【发布时间】:2018-04-02 10:26:54
【问题描述】:
我从某人那里复制了一个 Android Studio 项目,但我无法清理和重建该项目。这是弹出以下错误。
错误:任务 ':app:externalNativeBuildCleanDebug' 执行失败。
启动进程'command'C:\Users\Lenovo\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe''时出现问题
假设 Users\Lenovo 是以前的程序员用户名,而不是我的电脑用户名。
这是我的 build.gradle 应用程序
应用插件:'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "linkdood.isenseocr_android"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags ""
}
}
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
}
buildTypes {
release {
useProguard true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path 'CMakeLists.txt'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.rmtheis:tess-two:8.0.0'
implementation project(':openCVLibrary331')
implementation project(':isenselib')
}
有没有办法解决这个问题?
【问题讨论】:
-
能否把build.gradle文件的内容贴出来
-
哪个 build.gradle 文件?项目,应用程序,opencv,库。这个android studio文件是用来生成aar文件的。
-
要更改构建目录(最近命名为
.cxx),在another thread 中找到正确的解决方案,例如!请参阅CMake docs 和详细信息。