1.由于拆分代码导致Cannot fit requested classes in a single dex file (# methods: 70252 > 65536)报错解决方案:
移步此博客:
https://blog.csdn.net/qq_34772097/article/details/108274417
2.注意自己的文件路径一定要修改成现在的,否则你所有的实体类bean类引用全部报错,包括使用到这些类的各处acticity/自定义view/adapter。
3.使用到的各种样式及layout迁移。
4.添加依赖尽量按照代码逻辑进行添加,一开始全部挪进来,真是错到上天
5.签名文件共用,请移步此博客:
https://blog.csdn.net/qq_35352552/article/details/73369557
如果打包出错,一定是你密码错了,复制重填一下即可。此问题真的很狗!
6.由于Connected to the target VM, address: 'localhost:8601', transport: 'socket'导致网络请求失败:
找到报错提示所在代码:
查出ExceptionInInitializerError原因是清单文件出错(具体参考:https://blog.csdn.net/u011781521/article/details/52717328):
在清单文件加入你所需的即可。我此处添加为android:name=".bases.App"
7.冲突报错:Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.3.2-runtime (androidx.core:core:1.3.2) and support-compat-26.1.0-runtime (com.android.support:support-compat:26.1.0),解决方案参考:
https://www.cnblogs.com/360minitao/p/14388671.html
采用成功的方法:gradle.properties->添加android.enableJetifier=true