You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MacOS下Android Studio无法启动,安装前即异常已查系统偏好设置求助

Fixing Android Studio Not Launching on macOS

Hey there, let’s work through this Android Studio launch issue on your Mac together—since you mentioned problems started even before installation, we’ll focus on cleaning up potential leftovers and fixing system-level hiccups first.

1. Clear All Android Studio Residual Files

Old, incomplete installation files are often the culprit for pre-installation weirdness. Here’s how to wipe them completely:

  • Drag the Android Studio app from your Applications folder to the Trash and empty it.
  • Open Terminal and run these commands to delete hidden config/cache files:
    rm -rf ~/Library/Application\ Support/Google/AndroidStudio*
    rm -rf ~/Library/Preferences/com.google.android.studio.plist
    rm -rf ~/Library/Caches/Google/AndroidStudio*
    rm -rf ~/Library/Logs/Google/AndroidStudio*
    rm -rf ~/.android
    rm -rf ~/.gradle
    
    Note: Double-check you don’t have important projects or custom configs in these folders before running the commands—back them up if needed!

2. Verify Java Runtime Environment (JRE)

Android Studio relies on a compatible Java environment, even though it ships with its own JRE. Conflicts with system Java can break launches:

  • Open Terminal and run java -version to check your current Java version.
  • If you see outdated or missing Java, set Android Studio’s built-in JRE as your default:
    export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home"
    export PATH="$JAVA_HOME/bin:$PATH"
    
    To make this permanent, add those two lines to your ~/.zshrc (for Zsh users) or ~/.bash_profile (for Bash users), then restart Terminal.

3. Check System Permissions & Installation Integrity

macOS security settings or corrupted install files can block launches:

  • Open System Preferences > Security & Privacy. If you see a message saying Android Studio was blocked, click "Open Anyway" or "Allow" (you may need to unlock the settings first with your admin password).
  • Verify your install file’s integrity: Right-click the downloaded .dmg file, select "Get Info", and check the SHA-256 hash against the one listed on the Android Studio download page. If they don’t match, re-download the installer—corrupted files often cause launch failures.
  • Fix app permissions: Right-click Android Studio in Applications, select "Get Info", scroll to "Sharing & Permissions", and make sure your user account has "Read & Write" access. Click the lock icon to edit permissions if needed.

4. Test Launch in Safe Mode

Third-party apps or kernel extensions can interfere with Android Studio. Try launching it in Safe Mode:

  • Restart your Mac, hold the Shift key until the Apple logo appears.
  • Once in Safe Mode, try opening Android Studio. If it launches successfully, the issue is likely caused by a third-party app. Reboot normally and uninstall recently added apps/extensions one by one to find the culprit.

5. Dig Into Launch Logs for Specific Errors

If none of the above works, check Android Studio’s launch logs to pinpoint the exact issue:

  • Open Terminal and run this command (replace <version> with your Android Studio version, e.g., AndroidStudio2023.1):
    open ~/Library/Logs/Google/AndroidStudio<version>/idea.log
    
    Look for error messages like missing files, permission denied, or Java exceptions—these will give you a clear direction for troubleshooting.

内容的提问来源于stack exchange,提问作者Nageswaran

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:01:41