Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用lottie时清单合并失败,出现多个错误_Android - Fatal编程技术网

Android 使用lottie时清单合并失败,出现多个错误

Android 使用lottie时清单合并失败,出现多个错误,android,Android,清单合并失败:属性application@appComponentFactory值=(android.support.v4.app.CoreComponentFactory)来自[com.android.support:support compat:28.0.0]AndroidManifest.xml:22:18-91 这是我的gradle文件: dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])

清单合并失败:属性application@appComponentFactory值=(android.support.v4.app.CoreComponentFactory)来自[com.android.support:support compat:28.0.0]AndroidManifest.xml:22:18-91

这是我的gradle文件:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    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'
    // RxJava
    implementation 'io.reactivex.rxjava2:rxjava:2.1.9'

// RxAndroid
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'

    implementation 'com.android.support:customtabs:28.0.0-alpha3'
    implementation "com.airbnb.android:lottie:2.8.0"

}
显示

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.learnapplication">
    <uses-sdk tools:overrideLibrary="android.support.customtabs"/>
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">

        </activity>
        <activity android:name=".CustomTabActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

你对Gradle或清单没有问题,我也在寻找这个问题的解决方案,在清单中你不需要更改任何东西,而是使用至少21个SDK的最低版本,为了避免没收,尝试下载Lottie版本(我使用的是2.7.0)并尝试在渐变中添加以下几行:

implementation ('com.airbnb.android:lottie:2.7.0') {
    exclude group: 'com.android.support', module: 'support-v7'
    exclude group: 'com.android.support', module: 'support-v4'
    exclude group: 'com.android.support', module: 'design'
    exclude group: 'com.android.support', module: 'recyclerview'
    exclude group: 'com.android.support', module: 'transition'
}

祝你好运,兄弟!更新我

你能显示清单吗?我已经编辑了问题并添加了清单代码欢迎加入SO。尝试从自定义选项卡依赖项中删除
-alpha3
,然后尝试重新生成。不,它不起作用,而是证明我建议:将“tools:replace=”android:appComponentFactory“”添加到AndroidManifest.xml:6:5-23:19处的元素以覆盖。但这也并非如此working@AkankshaPaul我很高兴!竖起大拇指!:DDown将Lottie版本升级到2.7.0并添加这些行对我有帮助。谢谢。