gpt4 book ai didi

android - 无法解析 : play-services-phenotype with Firebase Remote Config and Firebase Performance Monitoring

转载 作者:行者123 更新时间:2023-11-29 15:35:32 27 4
gpt4 key购买 nike

当我尝试添加两个库时,在尝试同步 gradle 时出现以下错误:

Failed to resolve: play-services-clearcut
Open File


Failed to resolve: play-services-phenotype
Open File

这是我的项目级build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
/*classpath 'com.android.tools.build:gradle:1.0.0-rc2'*/
classpath 'com.google.gms:google-services:4.0.1'
classpath 'io.fabric.tools:gradle:1.25.4'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
}
}

allprojects {
repositories {
jcenter()
google()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }

}
}

这是应用程序级别的 build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'

...

dependencies {
//Firebase dependencies
implementation "com.google.firebase:firebase-messaging:17.0.0"
implementation "com.google.firebase:firebase-core:16.0.1"
implementation "com.google.firebase:firebase-config:16.0.0"
implementation 'com.google.firebase:firebase-perf:16.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
}

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

如有任何帮助,我们将不胜感激。

最佳答案

我最近遇到了这个问题,经过多次尝试出错,认为这只是 jcenter() 和 google() 的顺序。我知道这很愚蠢,但答案会帮助那些在同样问题上苦苦挣扎的人。感谢@Bob Snyder 在评论中指出这一点。

您的代码应如下所示:

repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
}

关于android - 无法解析 : play-services-phenotype with Firebase Remote Config and Firebase Performance Monitoring,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51227257/

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