[英]Getting error after importing project to android studio
尝试运行项目时出现此错误:
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
我的gradle:
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资源无法解析,这意味着资源链接也失败。
您的直觉是正确的! 可能是由于坡度版本行:
对我而言,它有助于将buildTools的版本更改为:
buildToolsVersion“ 21.0.1”您可以在app / build.gradle文件中找到此设置。
来源: 执行失败的应用程序:processDebugResources Android Studio
编辑:如果您更新到android studio 3.0我也有关于SDK生成工具版本的警告。 可能需要将版本更改为“ 21.0.2”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.