在用户的根目录下,创建个gradle.properties文件(C:\Users\Administrator\.gradle\gradle.properties),
设置其内容为(参见:陈煜东的博客和stackoverflow.com):
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx1136m
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:
org.gradle.jvmargs=-Xmx1024m
Read Gradle's configuration guide
Read about Java's heap size
上述设置,可能还是不行。那就重启Android Studio。重启,重启,重启!
:app:transformNative_libsWithSyncJniLibsForDebug FAILED
Error:Execution failed for task ':app:transformNative_libsWithSyncJniLibsForDebug'.
> error
清除Module的app/build文件夹!清除build文件夹!
清除build文件夹!