Failed to sync Gradle project

后端 未结 4 573
温柔的废话
温柔的废话 2020-12-24 03:20

I am using Android studio 1.3.1 and getting this failed to sync Gradle project error :

Error:Unable to start the daemon process: could not reserve enough spa         


        
相关标签:
4条回答
  • 2020-12-24 03:27

    in my case, if you use firebase with this dependency:

    com.google.firebase:firebase-firestore-ktx:21.4.2
    

    it will make Error:Unable to start the daemon process: could not reserve enough space for object heap

    so you have to erase ktx:

    com.google.firebase:firebase-firestore:21.4.2
    
    0 讨论(0)
  • 2020-12-24 03:44

    try this way Open gradle.properties file.

    add this line at the end:

    org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m
    

    or

    org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m
    
    0 讨论(0)
  • 2020-12-24 03:47

    Method 1 :

    For Android Studio 1.3 :

    Step 1 : Open gradle.properties file in your Android Studio project.

    Step 2 : Add this line at the end of the file

    org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m
    

    Above methods seems to work but if in case it won't then do this

    Method 2 :

    Step 1 : Start Android studio and close any open project (File > Close Project).

    Step 2 : On Welcome window, Go to Configure > Settings.

    Step 3 : Go to Build, Execution, Deployment > Compiler

    Step 4 : Change Build process heap size (Mbytes) to 1024 and Additional build process to VM Options to -Xmx512m.

    Step 5 : Close or Restart Android Studio.

    0 讨论(0)
  • 2020-12-24 03:47
    org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m
    

    Add this Line to the End of the gradle.properties file in Your project.

    remember without '#'..

    0 讨论(0)
提交回复
热议问题