Android Studio 3.1.3升级至3.6.1后旧项目的兼容操作方法
作者:OK_boom 时间:2022-03-27 10:15:41
因为gradle大幅升级至5 , as gradle plugin升级至3.6, 导致一些旧的项目基本重新编译时会出现各种错误, 经过各种尝试后, 得出一个付出成本最低,又能兼容旧项目的解决方法:
1/ 先屏蔽as的gradle升级提示, 它真是不厌其烦地提醒, 你若不小心点了升级, 极有可能让你的项目编译不了
2/打开旧项目, 如果项目中有用到annotationProcessor或androidannotations,DBFlow这类有预编译处理的依赖, 那多半死活不能编译的了, 最有效的方法就是File->Invalidate caches/Restart, 然后再打开该项目,File-> Sync Project with Gradle files, 然后再编译
再次提醒, 这个Gradle每次升级都会对旧的Gradle项目各种不兼容, 最有效的方法就是旧项目保持原来的Gradle&Gradle plugin版本!!
来源:https://blog.csdn.net/rocklee/article/details/104836446
标签:android,studio,3.1.3,升级,3.6.1
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Java调用CXF WebService接口的两种方式实例
2023-11-09 02:25:11
![](https://img.aspxhome.com/file/2023/7/58987_0s.jpg)
泛谈Java中的不可变数据结构
2022-02-18 00:12:54
深入了解Java ServletContext
2023-11-08 22:36:27
![](https://img.aspxhome.com/file/2023/7/59387_0s.png)
C#实现中英文混合字符串截取的方法
2022-07-11 10:02:35
Mybatis-Plus查询中如何排除标识字段
2023-11-23 20:38:46
![](https://img.aspxhome.com/file/2023/5/64555_0s.png)
Java实现石头剪刀布小游戏
2023-02-25 22:41:29
![](https://img.aspxhome.com/file/2023/2/75802_0s.jpg)
带你走进Maven的大门-最全Maven配置及集成idea工具总结
2022-12-06 08:41:40
![](https://img.aspxhome.com/file/2023/0/60680_0s.png)
C#Process的OutputDataReceived事件不触发问题及解决
2023-08-12 19:22:41
Java IO流—异常及捕获异常处理 try…catch…finally
2023-03-14 07:35:52
![](https://img.aspxhome.com/file/2023/1/62401_0s.png)
java运行windows的cmd命令简单代码
2021-06-12 11:50:47
![](https://img.aspxhome.com/file/2023/6/85836_0s.png)
Java详解IO流创建读取与写入操作
2023-01-23 01:50:28
简单探索 Java 中的惰性计算
2023-11-16 20:25:28
解决IDEA导入javaWeb项目注解爆红的问题
2021-08-07 13:42:02
![](https://img.aspxhome.com/file/2023/4/78894_0s.png)
ReentrantLock从源码解析Java多线程同步学习
2023-10-13 02:32:55
![](https://img.aspxhome.com/file/2023/9/58679_0s.png)
Springboot jpa @Column命名大小写问题及解决
2023-02-19 03:24:21
Spring Boot缓存实战之Redis 设置有效时间和自动刷新缓存功能(时间支持在配置文件中配置)
2023-11-11 01:57:18
![](https://img.aspxhome.com/file/2023/3/59053_0s.png)
C#中判断本地系统的网络连接状态的方法
2023-07-02 15:39:41
![](https://img.aspxhome.com/file/2023/7/84457_0s.jpg)
Android ViewPager实现图片轮翻效果
2023-08-01 00:30:57
Spring Bean初始化及销毁多种实现方式
2023-06-10 13:14:01
![](https://img.aspxhome.com/file/2023/0/71620_0s.jpg)
java控制台输出图书馆管理系统
2022-06-13 01:29:29
![](https://img.aspxhome.com/file/2023/4/61284_0s.jpg)