建议:在AndroidManifest.xml:5:5-21:19的<application>元素中添加'tools:replace =“ android:appComponentFactory”'以覆盖

时间:2019-09-10 04:18:26

标签: java android firebase

        last some day i am showing this problem.when i am connect fairbase with my apps and add some dependecy then i am showing this problem.i am using this  gradle seting  :

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

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

        dependencies {
            implementation fileTree(dir: 'libs', include: ['*.jar'])
            implementation 'com.android.support:appcompat-v7:28.0.0'
            implementation 'com.android.support:appcompat-v7:28.0.0'

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


            implementation 'com.android.support.constraint:constraint-layout:1.1.3'
            implementation 'com.google.firebase:firebase-database:19.1.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'
        }

        there are one Suggestion here but i know that how can i do it,anyone can help me for set this suggestion .this suggestion message is  

            Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-21:19 to override.

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

如果您对此问题有任何建议,可以告诉我。此问题仅在使用时显示,我对Fairbase使用了一些依赖,否则一切正常,我尝试使用此测试应用程序,因此我不使用任何xml或edittext。

0 个答案:

没有答案