且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

来自 androidx 和 com.android.support 的重复类

更新时间:2023-11-17 12:31:34

将这些行添加到 gradle.properties:

android.useAndroidX=true
android.enableJetifier=true

如果 gradle.properties 不存在,请在项目的根目录中创建该文件.

If gradle.properties is absent, create the file in the root directory of your project.

看起来您的依赖项中的任何地方都有一些 support 遗物,可能来自 lib?要调查并查看依赖关系树,请运行:

It looks like you have some support relics anywhere in your dependencies, maybe from a lib? To investigate and see the dependencies tree, please run:

./gradlew :yourApp:dependencies

然后你会看到它来自哪里.

and then you see from where it comes.