尝试运行项目时出现此错误:
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
我的傻瓜:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
buildscript {
repositories {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.trynagrub.trynagrub"
minSdkVersion 21
targetSdkVersion 25
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(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/signalr-client-sdk.jar')
compile files('libs/signalr-client-sdk-android.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true;
}
compile 'org.zakariya.stickyheaders:stickyheaders:0.7.6'
compile 'net.danlew:android.joda:2.9.9'
compile 'com.hbb20:ccp:2.0.3'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.xw.repo:bubbleseekbar:3.6'
compile 'com.github.pavlospt:circleview:1.3'
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
compile 'com.amitshekhar.android:android-networking:1.0.0'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.github.stfalcon:chatkit:0.2.2'
compile 'com.google.android.gms:play-services-gcm:11.0.4'
compile 'com.snatik:storage:2.1.0'
compile 'com.github.tamir7.contacts:contacts:1.1.7'
compile 'com.google.android.gms:play-services-maps:11.0.4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
我在两台计算机上安装了这个项目,一台是我编写的代码,一台是我发送代码的。该项目在第一台计算机上运行良好,但由于某种原因,它不能在第二台计算机上运行。
我认为它与gradle版本有关,我更新了Android studio版本和gradle版本...... 请帮忙......
另外:无法解析R资源,这意味着资源链接也失败了。
答案 0 :(得分:0)
对我而言,它有助于将buildTools的版本更改为:
buildToolsVersion" 21.0.1"您将在文件中找到此设置 应用程序/的build.gradle。
源: Execution failed app:processDebugResources Android Studio
编辑: 如果您更新到android studio 3.0我也有关于SDK构建工具版本的警告。可能需要将版本更改为" 21.0.2"代替。