错误01
 What went wrong: Out of memory. Required array size too large
Possible solution:
* Check the JVM memory arguments defined for the gradle process in:
gradle.properties in project root directory
解决:
将文件内容修改:gradle.properties
修改前
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
修改后
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
排除包
本地文件包
implementation files("libs/Somelib.jar") {
exclude(group = 'com.example.mypackage',module = 'somelib-ex')
}
依赖包
implementation('commons-beanutils:commons-beanutils:1.9.4') {
exclude group: 'commons-collections',module: 'commons-collections'
}