Android Studio 4.1卡在Mac的加载屏幕中 [英] Android Studio 4.1 Stuck at loading screen in Mac

查看:92
本文介绍了Android Studio 4.1卡在Mac的加载屏幕中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自昨天以来,我的Android Studio一直停留在加载屏幕上.X_X

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

我尝试过的事情:

  1. 重新启动计算机.
  2. 清除垃圾文件和日志.
  3. 完全卸载然后重新安装AndroidStudio.
  4. 采用了许多不同的解决方案(例如:其中之一是此处).但是仍然不起作用.解决方案摘录:
  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:

  • 打开文件Android Studio设置目录/bin/idea.properties
  • 添加 disable.android.first.run = true 结束
  • 重新启动Android Studio
    1. 当我删除SDK时,它可以工作,但是当我再次下载SDK时,它将在该会话中打开,然后再次卡在下一个会话中.

    好吧,我不想每次打开Android Studio时都总是删除并重新下载SDK.那么有人对此有任何解决方案吗?

    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?

    谢谢

    更多信息:

    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
    

    我的 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)
    

    我的/Library/Internet \插件/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)
    

    我的 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
    

    我的 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
    

    推荐答案

    这对我有效:

    1. 我设法通过欺骗它(如我在问题中所述的那样删除SDK并重新下载)将其打开.
    2. 转到帮助=>更改内存设置.然后将最大堆大小"更改为4096
    3. 按保存并重新启动"

    我不知道它为什么起作用以及我的问题的原因是什么.但这是一个快速修复.如果有人知道,请赐教.

    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.

    谢谢

    更新:我解决了这个问题.看来这是由外挂程式或sdk问题引起的.就我而言,它是Flutter软件包.可能或某种程度上,我机器上的安装出现问题,并且Android Studio试图加载它并卡住了.以某种方式切换频道并进行 flutter升级,然后重新安装flutter插件.为我解决了.所以可能只是一个指针:看看是否存在sdk/plugins安装问题

    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

    这篇关于Android Studio 4.1卡在Mac的加载屏幕中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆