gpt4 book ai didi

android - 错误 : Failed to resolve: com. google.firebase :firebase-crash:17. 2.2

转载 作者:行者123 更新时间:2023-12-02 17:13:06 28 4
gpt4 key购买 nike

我正在尝试更新项目中的 google 和 firebase SDK 库以解决 install_referrer deprecation 的问题但同步后出现错误

ERROR: Failed to resolve: com.google.firebase:firebase-crash:17.2.2

合并 list 上出现此错误

ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:28:5-422:19 to override.

这是我的 firebase 和 google 依赖项

    implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.firebase:firebase-crash:17.2.2'
implementation 'com.google.firebase:firebase-config:19.1.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'

implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.android.gms:play-services-maps:17.0.0'

implementation 'com.google.firebase:firebase-core:17.2.2'
implementation 'com.google.firebase:firebase-ads:18.3.0'
implementation 'com.google.firebase:firebase-messaging:20.1.0'

最佳答案

使用以下依赖项:

implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01'

并更新您的应用程序以使用 AndroidX:

Upgrade com.android.tools.build:gradle to v3.2.1 or later.

Upgrade compileSdkVersion to 28 or later.

Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.

https://developer.android.com/jetpack/androidx/migrate

<小时/>

更新:

您现在可以使用以下依赖版本:

dependencies {
// Recommended: Add the Firebase SDK for Google Analytics.
implementation 'com.google.firebase:firebase-analytics:17.5.0'

// Add the Firebase Crashlytics SDK.
implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
}

如果您在添加 firebase-crashlytics 时遇到问题,请检查以下文档:

https://firebase.google.com/docs/crashlytics/get-started?platform=android

https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android

关于android - 错误 : Failed to resolve: com. google.firebase :firebase-crash:17. 2.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60184831/

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