マニフェスト合併に失敗しました:appComponentFactory @属性のアプリケーションがFirebaseライブラリを更新します

ヨルダンKotiadis:

私は私のプロジェクトでfirebase追加しようとしていますが、私は実装したとき'com.google.firebase:firebase-messaging:19.0.0''com.google.firebase:firebase-core:17.0.0'

build.gradle(ここではエラーになります)

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

android {
 compileSdkVersion 28
 defaultConfig {
    applicationId "com.example.user.mikripoli"
    minSdkVersion 15
    targetSdkVersion 28
    multiDexEnabled true
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
 "android.support.test.runner.AndroidJUnitRunner"
 }
 buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
 'proguard-rules.pro'
    }
 }

 dexOptions {
    javaMaxHeapSize "2g"
 }
}

dependencies {
 implementation 'com.roughike:bottom-bar:2.0'
 implementation 'com.android.support:support-v4:28.0.0'
 implementation 'com.android.support:exifinterface:28.0.0'
 implementation 'com.android.support:animated-vector-drawable:28.0.0'
 implementation 'com.flaviofaria:kenburnsview:1.0.7'
 implementation fileTree(include: ['*.jar'], dir: 'libs')
 implementation 'com.android.support:appcompat-v7:28.0.0'
 implementation 'com.android.support.constraint:constraint-layout:1.1.3'
 implementation 'com.android.support:design:28.0.0'
 implementation 'com.github.chrisbanes:PhotoView:2.1.4'
 implementation 'com.google.firebase:firebase-messaging:19.0.0'
 implementation 'com.google.firebase:firebase-core:17.0.0'
 testImplementation 'junit:junit:4.12'
 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.android.support:cardview-v7:28.0.0'
 implementation "com.google.android.gms:play-services-location:17.0.0"
 implementation 'com.google.android.gms:play-services-maps:17.0.0'
 implementation 'com.google.android.gms:play-services-base:17.0.0'
 implementation 'com.github.ahmedshaban1:EasySlider:1.0.0'
 implementation 'com.liangfeizc:SlidePageIndicator:1.1.0@aar'
 implementation 'me.relex:circleindicator:1.2.2@aar'
 implementation 'com.github.bumptech.glide:glide:4.8.0'
 annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'

}

他のGradleのファイル:

buildscript {

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


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

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

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

示したエラーcom.android.support:support-v4:28.0.0

GroupID com.android.supportとandroidxを使用して依存性。*組み合わせが、見つからないIdeMavenCoordinates {myGroupId = 'com.android.support'、myArtifactId = 'cardview-V7'、myVersion = '28 .0.0' 、myPacking = 'AAR 」、myClassifier = 'NULL'}と{IdeMavenCoordinates myGroupId = 'androidx.coordinatorlayout'、myArtifactId = 'coordinatorlayout'、myVersion = '1.0.0'、myPacking = 'AAR'、myClassifier = 'NULL'}互換性のない依存関係

検査情報:互換性がない、またはバグにつながることができライブラリ、ツールとライブラリのいくつかの組み合わせがあります。そのような非互換性は、最新バージョンではありませんAndroidのサポート・ライブラリー(または特に、バージョンがtargetSdkVersionより低い)のバージョンでコンパイルされます。

また、私はAPKをビルドするときには、このエラーを示しています。

マニフェスト合併に失敗しました:[com.android.support:support-compat:28.0.0]のAndroidManifest.xmlからappComponentFactory値@属性アプリケーション=(android.support.v4.app.CoreComponentFactory):22:18から91も存在であります[androidx.core:コア:1.0.0]のAndroidManifest.xml:22:18から86値=(androidx.core.app.CoreComponentFactory)。提案:追加 'ツールは、:= "アンドロイド:appComponentFactory" を置き換える' 要素にAndroidManifest.xmlを時:13:5から354:19上書きします。

ツールを追加:置き換える=「アンドロイド:appComponentFactoryは」仕事はかかわりません

チラグRayani:

新しいリリースでは、ライブラリは、Jetpackの(AndroidX)ライブラリへのAndroidのサポートライブラリから移行されます。

あなたのアプリで次の変更を行う場合を除き、更新ライブラリが動作しません。

  • V3.2.1またはそれ以降com.android.tools.build:gradleをアップグレードします。

  • 28以降にcompileSdkVersionをアップグレードします。

  • Jetpackの(AndroidX)を使用するようにアプリを更新。指示に従ってくださいAndroidXへの移行を

方法-1:

この二人は何も更新せずに、あなたのgradle.propertiesファイルに追加します

android.useAndroidX=true
android.enableJetifier=true

方法-2

方法-1はあなたの問題を解決しない場合は、するには、Android Studioバージョン3.2以降、外出先を使用している場合は、1つのことを行う>リファクタリング移行をAndroidXに...

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=226102&siteId=1