Java Lottie Android Studio错误Appcompat

Java Lottie Android Studio错误Appcompat,java,android,android-studio,android-gradle-plugin,lottie-android,Java,Android,Android Studio,Android Gradle Plugin,Lottie Android,在实现lottie时,它在appcompat中告诉我这个错误。当我拿出彩票时,它的效果非常好 错误:任务“:app:transformDexArchiveWithExternalLibsDexMergerForDebug”的执行失败。 java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex - 未启用多索引。按照以下步骤打开此选项。 步骤1:将此添加到模块依赖项中 implem

在实现lottie时,它在appcompat中告诉我这个错误。当我拿出彩票时,它的效果非常好

错误:任务“:app:transformDexArchiveWithExternalLibsDexMergerForDebug”的执行失败。 java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex

-


未启用多索引。按照以下步骤打开此选项。 步骤1:将此添加到模块依赖项中

implementation 'com.android.support:multidex:1.0.3'
步骤2:在默认配置下添加此项

multiDexEnabled true
步骤3:将此添加到应用程序标记下的清单中

android:name="android.support.multidex.MultiDexApplication" >

然后清理并重建。

尝试使用
api'com.airbnb.android:lottie:2.5.4'
这就是我使用的
api
而不是
实现
谢谢你的帮助,但不要这样做谢谢你的帮助,但不要那样做
multiDexEnabled true
android:name="android.support.multidex.MultiDexApplication" >