gpt4 book ai didi

安卓工作室错误 :Execution failed for task ':app:processDebugGoogleServices'

转载 作者:搜寻专家 更新时间:2023-11-01 09:35:56 52 4
gpt4 key购买 nike

我正在使用 android studio 构建原生 android 应用程序。到目前为止,我已经使用 firebase 和 map 页面来获取内容,但我不断收到错误消息。我看到了与我类似的帖子,但那些是前段时间的不同版本。我想知道是否有人知道解决方案。

错误:

Error:Execution failed for task ':app:processDebugGoogleServices'. '>' Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.0.1.

应用级build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.me.myproject"
minSdkVersion 21
targetSdkVersion 23
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.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-maps:10.2.1'
testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

项目级build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

编辑:将 firebase 和播放服务更改为同一版本后,出现此错误(见下文),我被发送到文件 v24\values-v24.xml

Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt

最佳答案

草率的错误。您必须使用 Same version 。

 compile 'com.google.firebase:firebase-auth:10.2.1' //Use this instead of old .
compile 'com.google.android.gms:play-services-maps:10.2.1'

然后Clean-RebuildRun

关于安卓工作室错误 :Execution failed for task ':app:processDebugGoogleServices' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43181234/

52 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com