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

Mac M1环境下Android Studio启动崩溃意外退出问题求助

Mac M1设备Android Studio启动崩溃(架构不兼容错误)

问题现象

  • Mac M1设备上Android Studio启动即崩溃,无法正常运行
  • 执行安装包内MacOS/studio文件后,日志提示当前需要x86_64架构,但加载的是arm64版本的JVM库
  • 初始重启设备可临时解决,后续重启无效;升级至最新稳定版后问题依然存在

错误日志

2023-05-26 20:22:44.809 studio[4597:53107] Cannot load JVM bundle: Error Domain=NSCocoaErrorDomain Code=3585 "dlopen_preflight(/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib) => false, tried: '/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib' (no such file), '/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))" UserInfo={NSLocalizedFailureReason=The bundle doesn’t contain a version for the current architecture., NSLocalizedRecoverySuggestion=Try installing a universal version of the bundle., NSFilePath=/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib, NSDebugDescription=dlopen_preflight(/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib) => false, tried: '/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib' (no such file), '/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), NSBundlePath=/Volumes/Android Studio - Flamingo | 2022.2.1 Patch 2/Android Studio.app/Contents/jbr, NSLocalizedDescription=The bundle “OpenJDK 17.0.6” couldn’t be loaded because it doesn’t contain a version for the current architecture.}

解决步骤

1. 修正应用架构优先级设置

  • 右键点击Android Studio.app,选择「显示包内容」
  • 打开Contents/Info.plist文件(可用文本编辑器或Xcode编辑)
  • 查找LSArchitecturePriority数组字段:
    • 若数组内x86_64排在arm64之前,将arm64移至数组首位
    • 若该字段不存在,直接保存文件即可
  • 重启Android Studio尝试启动

2. 清除缓存与配置文件

  • 通过活动监视器强制结束Android Studio进程
  • 打开终端,执行以下命令清除缓存和旧配置:
    rm -rf ~/Library/Caches/Google/AndroidStudio*
    rm -rf ~/Library/Application\ Support/Google/AndroidStudio*
    
  • 重新启动Android Studio,等待配置重建

3. 验证安装包架构

  • 打开终端,进入应用所在目录(默认是/Applications/),执行:
    lipo -info /Applications/Android\ Studio.app/Contents/MacOS/studio
    
  • 输出若包含arm64,说明安装包为正确的arm架构;若仅显示x86_64,需重新下载官方arm版本安装包覆盖安装

4. 取消Rosetta强制运行设置

  • 右键点击Android Studio.app,选择「显示简介」
  • 取消勾选「使用Rosetta打开」选项
  • 重启设备后重新启动Android Studio

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.21 00:32:41