при реализации Lottie он сообщает мне об этой ошибке в файле appcompat. Когда я достаю лотерею, она отлично работает.
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.kevinladelfa.life"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.airbnb.android:lottie:2.5.4'
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'
compile 'com.android.support:support-annotations:27.1.1'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.google.firebase:firebase-crash:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-invites:11.8.0'
compile 'com.google.firebase:firebase-ads:11.8.0'
compile 'com.google.firebase:firebase-perf:11.8.0'
}
-
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:4.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven{
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Это тот, который я использую
используйте api вместо implementation
спасибо за помощь, но не делай этого
спасибо за помощь, но не делай этого




Мультидекс не включен. Следуйте инструкциям ниже, чтобы включить это. Шаг 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'