1

I can't open my Android Studio. I've tried to uninstall and install it again, but still the same problem. No error is given when I tried to launch the app. When I run studio.bat in the Command Prompt it shows me this error :

C:\Program Files\Android\Android Studio\bin>studio.bat

Start Failed: Internal error. Please refer to https://code.google.com/p/android/issues

java.lang.OutOfMemoryError: Java heap space
        at gnu.trove.TLongHashSet.rehash(TLongHashSet.java:162)
        at gnu.trove.THash.postInsertHook(THash.java:285)
        at gnu.trove.TLongHashSet.add(TLongHashSet.java:146)
        at com.intellij.util.lang.ClasspathCache$LoaderDataBuilder.addPossiblyDuplicateNameEntry(ClasspathCache.java:83)
        at com.intellij.util.lang.JarLoader.buildData(JarLoader.java:160)
        at com.intellij.util.lang.ClassPath.initLoader(ClassPath.java:256)
        at com.intellij.util.lang.ClassPath.initLoaders(ClassPath.java:215)
        at com.intellij.util.lang.ClassPath.getLoaderSlowPath(ClassPath.java:166)
        at com.intellij.util.lang.ClassPath.getLoader(ClassPath.java:145)
        at com.intellij.util.lang.ClassPath.getResource(ClassPath.java:113)
        at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:335)
        at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:326)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at com.intellij.idea.Main.bootstrap(Main.java:108)
        at com.intellij.idea.Main.main(Main.java:84)

-----
JRE 1.8.0_281-b09 amd64 by Oracle Corporation
C:\Program Files\Java\jdk1.8.0_281\jre
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

Please help.

2
  • Did you get your answer? Commented Feb 15, 2021 at 11:27
  • @abbasjafary nope Commented Feb 16, 2021 at 1:56

2 Answers 2

1

add these in your manifest these lines:

android:hardwareAccelerated="false"
android:largeHeap="true"

@your manifest.xml would like to be:

<application
android:allowBackup="true"
android:hardwareAccelerated="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="@style/AppTheme">

For more information please refer to this link.

Or please make sure you have set enough memory in the project's gradle.properties. The default was changed from 1g to 512m in 5.0 and you can open gradle.properties file with notepad

Sign up to request clarification or add additional context in comments.

7 Comments

Hi, I can't launch the Android Studio, not the app that I'm making. Thanks
Hi @MichaelRenoPratamaSetyawan I edited my answer and I hope this work for you, How much RAM is in your computer?
Hi, my laptop has 8gb of RAM but I dont know how much my RAM usage.
What is your operating system?
Windows 10, anything else?
|
0

Check your device (mobile or emulator's) memory size. Some times this may happen when memory is not set for install and extract the app.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.