Android studio 禁用AndroidX方式
2020-05-01 12:06
1551 查看
gradle.properties文件中添加
android.useAndroidX=false #禁用AndroidX
android.enableJetifier=false #禁止第三方jar包使用androidX
补充知识:解决Android Studio androidx 包冲突问题
如果包冲突了会包如下这样的错:
Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.1) classpath. You should manually set the same version via DependencyResolution
1.打开Terminal
输入:
./gradlew -q app:dependencies
查看依赖冲突文件
2.在build.gradle里buildscript标签下添加
subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "27.1.1" } if (details.requested.group == 'androidx.core' && !details.requested.name.contains('androidx') ) { } } } }
某个包冲突 就 在group androidx.core 并且指定Androidx 要用的版本
以上这篇Android studio 禁用AndroidX方式就是小编分享给大家的全部内容了,希望能给大家一个参考
您可能感兴趣的文章:
相关文章推荐
- Android O体验系列(一)Android Studio2.4预览版的使用及项目使用配置方式
- windows下编译最新版ffmpeg3.3-android,并通过CMake方式移植到Android studio2.3中
- Android开发工具之Android Studio--如何打包sdk通过arr包的方式
- Android dp方式的屏幕适配工具使用(Android Studio插件方式)
- Android 使用OpenCV的三种方式(Android Studio)
- android 禁用锁屏 到修改方式
- Android高阶之Android studio-友盟多渠道打包方式
- Android打包(Android Studio方式)
- windows下编译最新版ffmpeg3.3-android,并通过CMake方式移植到Android studio2.3中
- android项目两种构建方式的整合(Eclipse/idea和Android Studio)
- Android 使用OpenCV的三种方式(Android Studio)
- android studio 编译出现Instant Run requires 'tools|Android|Enable adb integration' to be enabled错误解决方式'
- android项目两种构建方式的整合(Eclipse/idea和Android Studio)
- android项目两种构建方式的整合(Eclipse/idea和Android Studio)
- Android studio2.2配置opencv for android(CMake方式)
- android--------Android Studio常见问题以及解决方式
- android--------Android Studio常见问题以及解决方式
- android项目两种构建方式的整合(Eclipse/idea和Android Studio)
- windows下编译最新版ffmpeg3.3-android,并通过CMake方式移植到Android studio2.3中