My Android Studio has been stuck at loading screen since yesterday. X_X
What I have tried:
- Restarting computer.
- Clearing junk files and logs.
- Completely uninstall and then Reinstalling AndroidStudio.
- Followed many different solutions (e.g: one of it is here). But still doesn’t work. Excerpt from the solution:
- Open file Android Studio setup directory/bin/idea.properties
- Add
disable.android.first.run=true
to end - Restart Android Studio
- When I deleted the SDK it worked, but then after I let it download the SDK again, it opens for that session, then stuck again on the next session.
Well, I don’t want to always delete and re-download the SDK every time I open Android Studio. So does anyone have any solution to this?
Thanks
More Info:
Android Studio 4.1 Build #AI-201.8743.12.41.6858069, built on September 23, 2020 Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.15.6 GC: ParNew, ConcurrentMarkSweep Memory: 4029M Cores: 8 Registry: ide.new.welcome.screen.force=true Non-Bundled Plugins: org.jetbrains.kotlin, Dart, io.flutter
My jave -version
openjdk version "14.0.1" 2020-04-14 OpenJDK Runtime Environment (build 14.0.1+14) OpenJDK 64-Bit Server VM (build 14.0.1+14, mixed mode, sharing)
My /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.8.0_271" Java(TM) SE Runtime Environment (build 1.8.0_271-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)
My studio.vmoption
:
-Xms1G -Xmx4G -XX:MaxPermSize=1G -XX:ReservedCodeCacheSize=512m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -XX:CICompilerCount=2 -Dsun.io.useCanonPrefixCache=false -Djdk.http.auth.tunneling.disabledSchemes="" -Djdk.attach.allowAttachSelf=true -Dkotlinx.coroutines.debug=off -Djdk.module.illegalAccess.silent=true -Djna.nosys=true -Djna.boot.library.path= -Didea.vendor.name=Google -XX:+UseCompressedOops -Dfile.encoding=UTF-8 -XX:ErrorFile=$USER_HOME/java_error_in_studio_%p.log -XX:HeapDumpPath=$USER_HOME/java_error_in_studio.hprof
My idea.properties
:
idea.max.intellisense.filesize=2500 idea.cycle.buffer.size=1024 sun.java2d.d3d=false idea.dynamic.classpath=false idea.no.launcher=false idea.xdebug.key=-Xdebug sun.java2d.uiScale.enabled=true swing.bufferPerWindow=true idea.fatal.error.notification=disabled javax.swing.rebaseCssSizeMap=true idea.max.content.load.filesize=20000 idea.popup.weight=heavy sun.java2d.pmoffscreen=false CVS_PASSFILE=~/.cvspass com.apple.mrj.application.live-resize=false java.endorsed.dirs= idea.smooth.progress=false apple.laf.useScreenMenuBar=true apple.awt.fileDialogForDirectories=true apple.awt.graphics.UseQuartz=true apple.awt.fullscreencapturealldisplays=false idea.jre.check=true disable.android.first.run=true
Advertisement
Answer
This works for me somehow:
- I managed to get it open first by tricking it (deleting SDK and re-downloading it as I have stated in the question).
- Go to Help => Change memory settings. Then change the Maximum Heap Size to 4096
- Press Save and Restart
I don’t know why it works and whats the cause of my problem. But this is a quick fix. If anybody knows, please enlighten me.
Thanks
Update:
I fixed the problem. It seems that it it was caused by plugins or sdk problem. In my case it was the Flutter package. Probably or somehow the installation on my machine had a problem and possibly Android studio tried to load it and got stuck. Somehow switching channels and doing flutter upgrade
then reinstalling flutter plugins. Solved it for me.
So probably just a pointer: see if there is any sdk / plugins installation problem