When IDEA is developing an android project, it reports an error when it starts.
Error:Android Gradle Build Target: org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation ‘C:\Users\musarona\.gradle\wrapper\dists\gradle-2.14.1-all\8bnwg5hd3w55iofp58khbp6yv\gradle-2.14.1’.
Error:Failed to complete Gradle execution.
Cause:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
———————–
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap
The main idea of this error is that IDEA cannot allocate memory space to the virtual machine. To solve this kind of problem is to adjust the memory configuration in idea.exe.vmoptions.
-XX:ReservedCodeCacheSize=240m
Change to
-XX:ReservedCodeCacheSize=480m
If you still have problems, you can adjust other options in idea.exe.vmoptions
-Xmx512m
-XX:MaxHeapSize=512m
Ok. Edit, the next day the project is not working, so I will report this error.
Adjusting the heap in the compiler to 2G will not work.
Be puzzled. Think about it as an error reported in gradle, gradle should have a configuration that needs to take up memory. When I opened it, I was shocked. The default jvm memory of gradle is 1536m, which corresponds to 1572864KB in the error message. Then change it to a smaller size, change it to 512m, restart the compilation and pass it once.
Read More:
- Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap
- IDEA reports an error. Error XXX reports an error. The class cannot be found
- [Solved] NPM run build package error: Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory
- [Solved] Build Error Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory
- [Solved] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of me
- [Solved] Response Export error on submit request on future invoke, java.lang.OutOfMemoryError: Java heap space
- Node Memory Overflow: FATAL ERROR: Reached heap limit Allocation failed – JavaScript heap out of memory
- [Solved] Postcss Error: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
- The SDK of Android webrtc compiled with Ninja – C out / release command reported an error, and the Android NDK processing method could not be found
- [Solved] GDAL+OPENCV often reports errors when processing remote sensing impacts
- [Solved] Error: ‘attrition‘ is not an exported object from ‘namespace:rsample‘
- Android studio reports an error when running the main() method
- The Ajax return value reports an error, and the spring boot development Ajax return value reports an error
- [Solved] Idea 2020 uses SVN error: ‘C: \ program’ is not an internal or external command
- [Solved] An error occurred while processing your request…enable the Development environment by setting …
- [Solved] IDEA Start Project Error: Abnormal build process termination:Could not create the Java Virtual Machine.
- Mac Start IDEA Error: Cannot load JVM bundle…Value of IDEA_VM_OPTIONS is (null)
- Maven compiles Scala and reports an error stackoverflowerror
- Solve Error: call_and_retry_last allocation failed – javascript heap out of memory
- [Solved] Hexo FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed