为了账号安全,请及时绑定邮箱和手机立即绑定

com.google.android.material:material:1.1.0-alpha08

com.google.android.material:material:1.1.0-alpha08

阿波罗的战车 2023-04-13 17:16:43
我正在研究新的 android 材料,它看起来不错,但为了正确使用颜色选项,我需要使用 com.google.android.material:material:1.1.0(最新的是 alpha08)显然有一个依赖性问题,因为当我在 android studio 中构建时它说一切正常但是当我运行时它丢失了 android material com.android.builder.dexing.DexArchiveBuilderException在运行时(像这样)。这是我的 app.build.gradledependencies {    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'}据我所知,我们的一切都处于最佳状态,所以你认为问题是什么?
查看完整描述

1 回答

?
慕工程0101907

TA贡献1887条经验 获得超5个赞

我发现这是原因,将其添加到build.gradle [Module.app]文件中


android {


   [.YOUR.OTHER.STUFF.HERE.]


   compileOptions {

      sourceCompatibility JavaVersion.VERSION_1_8

      targetCompatibility JavaVersion.VERSION_1_8

   } 

}


查看完整回答
反对 回复 2023-04-13
  • 1 回答
  • 0 关注
  • 157 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信