android studio 升级到最新版遇到的各种配置问题
16lz
2021-01-23
android IED 从3.1.2 升级到最新 3.3
gradle 使用的最新版本 4.10.1
ERROR: Could not set unknown property 'enforceUniquePackageName' for object of type com.android.build.gradle.LibraryExtension.Open File
高版本不允许有 enforceUniquePackageName根据提示点击 Open File 注释掉 enforceUniquePackageName = false try again 然后
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.It will be removed at the end of 2018. For more information see:http://d.android.com/r/tools/update-dependency-configurations.htmlAffected Modules: xxxx,xxxxx【出问题的模块】WARNING: Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation'.It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.htmlAffected Modules: xxxx,xxxxx【出问题的模块】
根据提示 2018 年后不允许使用 compile 和 androidTestCompile 替换相应引用方式 到对应的模块下将原有的 compile --》 api,androidTestCompile --》 androidTestImplementation如果有多个请将多个替换。示例如下:
oldercompile fileTree(include: '*.jar', dir: 'libs')androidTestCompile('xxxxxx')newapi fileTree(include: '*.jar', dir: 'libs')androidTestImplementation('xxxxxx')
大部分已经万事大吉,尽情使用最新环境撸代码。
更多相关文章
- android通过Intent调用手机图片,音频,视频录音拍照等代码
- android通过图片名称获取资源识别码
- gallery显示图片轮换(手动和自动)
- Android 编辑头像功能简单实现实例(图片选取,裁剪)
- android中圆角图片(ImageView)
- Android使用xml自定义图片实例详解
- 【Android】图片显示内存优化(解决“bitmap size exceeds VM budg
- Android 图片工具类整理