gradle project sync failed. basic functionality(e.g editing, debugging) will not work properly in android studio 1.0.1

前端 未结 6 2489
南方客
南方客 2021-02-15 22:59

I have started using Android Studio 1.0.1 and there is nothing I can do as I have this error and even the XML can\'t be rendered.

Error:Unable to start the daemon proces

相关标签:
6条回答
  • 2021-02-15 23:20

    Here is what made it work for me:

    File --> Other Settings --> Default Project Structure

    Under JDK location, hit the "Use embedded JDK (recommended)" box.

    0 讨论(0)
  • 2021-02-15 23:20

    I got the same issue. The fix in my case was to refer to a correct version of JDK. My Android Studio is 64-bit (on Windows you can see it in task manager as studio64.exe) while it was referring to 32-bit JDK. To check it go to File > Other Settings > Default Project Structure > JDK location and check the path. Under windows, if it shows 32-bit location C:\Program Files (x86)\Java\jdk1.7.0_25 instead of 64-bit path C:\Program Files\Java\jdk1.7.0_XX then change it to the correct one. If you don't have a 64-bit JDK then download and install it.

    0 讨论(0)
  • 2021-02-15 23:22

    You might just be out of virtual memory.

    You are focused on RAM usage (or lack of) but your existing JVMs are reserving virtual memory, not RAM. As long as reserved pages of memory are not accessed, there is no RAM usage reported for them.

    While Linux usually mask this issue by its over-commitment settings, it is quite possible that the fact you are running in an OS level virtualized environment either reduce/disable over commitment or set a virtual memory resource control capping.

    On a regular OS instance (not a container), the easiest way to workaround this is to add some swap which will allow the reserved memory not to waste RAM. On a container, the way to overcome the issue might also require increasing the globally available virtual memory but more generally is simply done by granting more virtual memory to the container.

    (https://unix.stackexchange.com/questions/109653/java-could-not-reserve-enough-space-for-object-heap-even-though-there-is-enoug)

    0 讨论(0)
  • 2021-02-15 23:25

    Hello this is Occured due to VM Selection:-

    This is for android studio.Try to follow the following steps:-

    1)Go to File and select settings.

    2)now select Compiler option in right hand side.

    3)Now in VM option put the following value

    -Xmx512m -XX:MaxPermSize=512m

    Now apply it. This will work for me hopefully work for you.

    0 讨论(0)
  • 2021-02-15 23:27

    I had this problem and the following steps worked well for me :

    1.Remove .gradle from the user home directory

    2.file -> Invalidate Caches/Restart -> Just Restart

    0 讨论(0)
  • 2021-02-15 23:31

    Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

    Same thing happened with me.It is just because your 32 bit OS doesn't have enough space. Here is the solution,

    1.Open File->Settings->Build tools->Compiler

    2.there in compiler you just update VM-options to -Xmx512m -XX:MaxPermSize=512m

    Note:You need to type the same, including the space in between.

                            OR
    

    1.Just update the line in gradle.properties # org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m

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