gpt4 book ai didi

java - gradle 脚本中的实现错误 - android studio api28

转载 作者:行者123 更新时间:2023-12-02 02:16:37 24 4
gpt4 key购买 nike

我正在尝试实现 Google 服务,例如广告和 Firebase。我正在为每个工具使用最新版本。

我尝试添加//noinspection GradleCompatible,更改某些实现的版本并添加tools:replace="android:appComponentFactory 到 list

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.android.gms:play-services-ads:18.1.1'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.android.gms:play-services-auth:17.0.0'

}

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

帮我解决这个错误。

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:8:5-76:19 to override.

最佳答案

将这些标志放入您的 gradle.properties

android.enableJetifier=true
android.useAndroidX=true

关于java - gradle 脚本中的实现错误 - android studio api28,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57298502/

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