How to solve java.lang.OutOfMemoryError: GC overhead limit exceeded error in android studio

后端 未结 7 929
执笔经年
执笔经年 2021-01-31 02:53

I am using android studio 1.0 RC for 64 bit linux.

When I run my application I am getting

\"java.lang.OutOfMemoryError: GC overhead limit          


        
相关标签:
7条回答
  • 2021-01-31 03:39

    For Android projects you use gradle plugin, at root build.gradle.kts:

    buildscript {
        repositories {
            google()
            jcenter()
        }
        dependencies {
            classpath("com.android.tools.build:gradle:${gradle_plugin_version}")
        }
    }
    

    Upgrade gradle_plugin_version to the latest one.

    The reason for that is the latest Gradle version should be used with the latest Gradle plugin version.

    For example, for Gradle 6.3 you should use gradle-plugin 4.0.1:

    distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
    
    buildscript {
        repositories {
            google()
            jcenter()
        }
        dependencies {
            classpath("com.android.tools.build:gradle:4.0.1")
        }
    }
    
    0 讨论(0)
提交回复
热议问题