![](/img/trans.png)
[英]Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt
[英]blocked with Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt
到昨天为止,一切正常。
我之间没有更新任何东西。
但是突然之间,我不断收到此错误“错误:任务':app:processDebugResources'的执行失败。
com.android.ide.common.process.ProcessException:无法执行aapt“
我尝试将sdk更新为27.0.0,但仍然收到相同的错误消息。
尝试多次删除.gradle文件夹,构建文件夹和清理项目。 但没有帮助。
这里出了什么问题?
这是我的build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.udayrepo.doctortracker"
minSdkVersion 17
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:design:26.0.1'
testCompile 'junit:junit:4.12'
}
上面的错误确实很烦人,没有任何线索可以解决问题所在。
正如许多其他人所说,我尝试探索替换app.gradle文件中的每个库。
我搜索Android SDK Plackage中的每个最新软件包,并使用以下方法更新了我的gradle文件中的每个软件包
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:recyclerview-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
testCompile 'junit:junit:4.12'
然后它开始工作。
我只是分享解决方案,因为它可能也会对其他人有所帮助。 只需查找最新版本并更新安装所需的软件包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.