当我尝试同步gradle
文件时,我一直收到此错误
Error:Execution failed for task ':app:processDebugGoogleServices'.
请通过更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms版本更新为11.0.0来修复版本冲突
在发布此问题之前,我访问了here,因为错误与我的错误类似,根据我已删除的答案apply plugin: 'com.google.gms.google-services'
并尝试再次同步build was successfull
},但是当我试图在我的设备上运行应用程序时,它发出错误
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForDebug'.
我已经尝试了this链接中的所有答案,甚至尝试将播放服务服务版本11.0.0
更改为11.0.1
,但这些都没有效果。
这是我的build.gradle(模块)文件:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.hp.passwordStorage"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
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:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.google.firebase:firebase-admin:5.2.0'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
}
这是我的build.gradle(app)文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
classpath 'io.fabric.tools:gradle:1.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
任何人都可以帮助我吗? 谢谢:))
答案 0 :(得分:0)
答案 1 :(得分:0)
确保您已配置根级Gradle文件和模块Gradle文件(通常为app/build.gradle
)。查看此guide,它可以帮助您了解如何将Firebase库集成到项目中。此外,此次崩溃的原因可能是测试设备上安装的Google Play服务版本。确保您在测试设备上安装了最新的Google Play服务版本。