gpt4 book ai didi

android - Firebase 核心依赖 : Program type already present: android. support.v4.app.INotificationSideChannel

转载 作者:太空狗 更新时间:2023-10-29 14:36:42 26 4
gpt4 key购买 nike

在我的项目中包含 Firebase 核心依赖项之后

implementation 'com.google.firebase:firebase-core:15.0.2'

我遇到了这个错误。

Program type already present: android.support.v4.app.INotificationSideChannel Message{kind=ERROR, text=Program type already present: android.support.v4.app.INotificationSideChannel, sources=[Unknown source file], tool name=Optional.of(D8)}

我经历了几个类似的问题,但似乎都没有解决我的错误。

这是我的应用级别build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion "28.0.2"
defaultConfig {
applicationId "com.example.chandranichatterjee.appname"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
//implementation 'com.google.firebase:firebase-core:11.2.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3'
}
apply plugin: 'com.google.gms.google-services'

下面是我的项目级build.gradle:

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:4.0.1'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

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

我还在 gradle.properties 中包含以下行:

android.useAndroidX=true
android.enableJetifier=true

感谢任何帮助。谢谢!

最佳答案

1.

classpath 'com.android.tools.build:gradle:3.1.0'

==>

classpath 'com.android.tools.build:gradle:3.2.0'

https://developer.android.com/studio/releases/gradle-plugin

Plugin version, Required Gradle version
3.2.0 - 3.2.1 , 4.6+
3.3.0 - 3.3.2 , 4.10.1+
3.4.0+ , 5.1.1+
  1. 添加gradle.properties
android.useAndroidX=true
android.enableJetifier=true

关于android - Firebase 核心依赖 : Program type already present: android. support.v4.app.INotificationSideChannel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54146617/

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