4

My Android Studio has been stuck at loading screen since yesterday. X_X

enter image description here

What I have tried:

  1. Restarting computer.
  2. Clearing junk files and logs.
  3. Completely uninstall and then Reinstalling AndroidStudio.
  4. 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
  1. 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

2 Answers 2

4

found the answer in https://stackoverflow.com/questions/54806995/android-studio-corrupt-installation/61701185#61701185

I just delete the folder

MacOS: ~/Library/Application Support/Google/AndroidStudio4.1

and it works.

1
  • thank you! after a couple hours and tries re-installing. this worked
    – ninajay
    Commented Mar 18, 2021 at 13:28
0

When running from terminal you can see the error causing it to enter a restart loop.

My fix was to just re-install using JetBrains Toolbox.

2021-04-09 17:47:38,379 [  45709]  ERROR - llij.ide.plugins.PluginManager - Android Studio 4.1.3  Build #AI-201.8743.12.41.7199119
2021-04-09 17:47:38,444 [  45774]  ERROR - rationStore.ComponentStoreImpl - Android Studio 4.1.3  Build #AI-201.8743.12.41.7199119
2021-04-09 17:47:38,444 [  45774]  ERROR - rationStore.ComponentStoreImpl - JDK: 1.8.0_242-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2021-04-09 17:47:38,444 [  45774]  ERROR - rationStore.ComponentStoreImpl - OS: Mac OS X
2021-04-09 17:47:38,444 [  45774]  ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_242-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2021-04-09 17:47:38,445 [  45775]  ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
2021-04-09 17:47:38,444 [  45774]  ERROR - rationStore.ComponentStoreImpl - Last Action:
2021-04-09 17:47:38,445 [  45775]  ERROR - llij.ide.plugins.PluginManager - Last Action:
2021-04-09 17:47:38,445 [  45775]  ERROR - llij.ide.plugins.PluginManager - Could not initialize class com.intellij.internal.statistic.service.fus.collectors.FUCounterUsageLogger
java.lang.NoClassDefFoundError: Could not initialize class com.intellij.internal.statistic.service.fus.collectors.FUCounterUsageLogger
  at com.intellij.featureStatistics.fusCollectors.LifecycleUsageTriggerCollector.onError(LifecycleUsageTriggerCollector.java:123)
  at com.intellij.diagnostic.DefaultIdeaErrorLogger.canHandle(DefaultIdeaErrorLogger.java:62)
  at com.intellij.diagnostic.DialogAppender.appendToLoggers(DialogAppender.java:85)
  at com.intellij.diagnostic.DialogAppender.lambda$queueAppend$0(DialogAppender.java:58)
  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
  at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
  at java.awt.EventQueue.access$500(EventQueue.java:98)
  at java.awt.EventQueue$3.run(EventQueue.java:715)
  at java.awt.EventQueue$3.run(EventQueue.java:709)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
  at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
  at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:974)
  at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:847)
  at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:449)
  at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:741)
  at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
  at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
  at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
  at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2021-04-09 17:47:38,446 [  45776]  ERROR - rationStore.ComponentStoreImpl - Conflicting component name 'UsagesStatistic': class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent and class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent (componentManager=Application (containerState=ACTIVE) )
java.lang.Throwable: Conflicting component name 'UsagesStatistic': class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent and class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent (componentManager=Application (containerState=ACTIVE) )
  at com.intellij.openapi.diagnostic.Logger.error(Logger.java:146)
  ...
  at com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent.getInstance(UsageStatisticsPersistenceComponent.java:54)
2
  • Good point. How did you run via the command line?
    – site
    Commented Apr 11, 2021 at 2:08
  • Looks like to get all the output in the terminal you can run at the command line /Applications/Android\ Studio\ 4.app/Contents/MacOS/studio. An alternative if you need to start a new instance is this command open -n /Applications/Android\ Studio\ 4.app/ where -n stands for new instance
    – site
    Commented Apr 13, 2021 at 18:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .