Unable to execute dex: Java heap space Java heap space

前端 未结 5 933
梦谈多话
梦谈多话 2021-02-05 02:30

I am getting Unable to execute dex: Java heap space Java heap space error while executing web driver script in Eclipse IDE. I have configured Eclipse IDE with Android SDK and AV

相关标签:
5条回答
  • 2021-02-05 02:32

    When facing this problem I found that my eclipse.ini was renamed to _eclipse.ini, thus Eclipse was not able to find it and took to these misbehaviours.

    I renamed it back to eclipse.ini and everything backed to work normally.

    0 讨论(0)
  • 2021-02-05 02:34

    You said

    I also increased the -Xms200m to -Xmx512m

    -Xms200m and -Xmx512m are two different things. Maybe you wanted to say

    from -Xms200m to -Xms512m

    and

    from -Xmx200m to -Xmx512m

    0 讨论(0)
  • 2021-02-05 02:41

    The accepted solution to this post worked for me: Conversion to Dalvik format failed: Unable to execute dex: Java heap space

    The gist is: Keep increasing the Xms and Xmx values until it either works or you run out of physical memory.

    E.g.: -XX:MaxPermSize=1536m -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx1536m

    0 讨论(0)
  • 2021-02-05 02:48

    Adding this to my build.gradle finally solved it for me

    dexOptions {
            preDexLibraries = false
    }
    
    0 讨论(0)
  • 2021-02-05 02:50

    Change -Dosgi.requiredJavaVersion=1.5 to

    -Dosgi.requiredJavaVersion=1.6
    

    if your eclipse project is using java compiler 1.6. I just solved this problem.

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