Android Studio 错误集

时间:2024-03-21 18:33:38

错误列表与解决方案:

1.Android studio Gradle project sync failed

Android studio 构建项目出错

Error:Unable to start the daemon process: could not reserve enough space for object heap.
Please assign more memory to Gradle in the project's gradle.properties file.
For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB:
<em>org.gradle.jvmargs=-Xmx1024m</em>
<a href="http://www.gradle.org/docs/current/userguide/build_environment.html">Read Gradle's configuration guide</a><br><a href="http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html">Read about Java's heap size</a>

修改项目gradle.properties文件,添加下面一行代码已存在则更改org.gradle.jvmargs=-Xmx512m:

org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m 

2.Android studio android-java-exe-finished-with-non-zero-exit-value-1

clean project

rebuild project