I am looking into the new android material stuff and it looks fine but in order to properly utilise the colour options I need to use com.google.android.material:material:1.1.0 (the latest of which is alpha08) clearly there is a dependency issue because when I build in android studio it says all ok but when I run it is is missing
android material com.android.builder.dexing.DexArchiveBuilderException
at run time (like this).
this is my app.build.gradle
dependencies {
implementation 'androidx.core:core:1.0.2'
implementation 'androidx.media:media:1.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
implementation 'com.google.android.material:material:1.0.0' // fails if I switch to implementation 'com.google.android.material:material:1.1.0-alpha08'
api 'com.google.guava:guava:28.0-android'
implementation files('libs/acra-4.5.0.jar')
implementation files('libs/commons-collections-3.2.1.jar')
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
}
as far as I can tell everything us in tip top shape so what is the issue do you think?
I found out this is the cause , add this to build.gradle [Module.app]
file
android {
[.YOUR.OTHER.STUFF.HERE.]
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.