只要选择 调试模式(debug?) ,在编译阶段就会产生错误讯息,
Exception in thread “pool-3-thread-2” java.lang.OutOfMemoryError: Java heap space
at java.lang.Object.clone(Native Method)
at com.google.common.io.ByteSource$ByteArrayByteSource.read(ByteSource.java:520)
at com.android.builder.internal.packaging.zip.utils.CloseableDelegateByteSource.read(CloseableDelegateByteSource.java:136)
at com.android.builder.internal.packaging.zip.compress.DeflateExecutionCompressor.immediateCompress(DeflateExecutionCompressor.java:70)
at com.android.builder.internal.packaging.zip.compress.ExecutorCompressor.lambda$compress$0(ExecutorCompressor.java:55)
at com.android.builder.internal.packaging.zip.compress.ExecutorCompressor$$Lambda$194/23179783.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
FAILURE: Build failed with an exception.
at went wrong:
Execution failed for task ‘:hello_world:packageDebug’.
Java heap space
- Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.