简体   繁体   English

Android Studio 不想打开项目 (macOS)

[英]Android Studio doesn't want to open project (macOS)

Android Studio 3.4.2 can't open project on macOS 10.15 Beta (19A526h) Android Studio 3.4.2 无法在 macOS 10.15 Beta (19A526h) 上打开项目

Open Android Studio -> press Open an existing Android Studio project -> select folder with project -> NOTHING happens打开 Android Studio -> 按Open an existing Android Studio project -> select 文件夹与项目 -> 没有任何反应

I can create new project though, but can't open existing one.我可以创建新项目,但无法打开现有项目。

Is there anything i missing here?我在这里有什么遗漏吗? Any help is appreciated.任何帮助表示赞赏。

I have met the same problem.我遇到了同样的问题。 It works by dragging folder onto AndroidStudio directly.它的工作原理是直接将文件夹拖到 AndroidStudio 上。

I made it easier to open projects with Finder by associating all settings.gradle files with Android Studio and then launching that file to open a project.通过将所有settings.gradle文件与 Android Studio 相关联,然后启动该文件以打开项目,我可以更轻松地使用 Finder 打开项目。 (I'm on Android Studio 4.2.2) (我使用的是 Android Studio 4.2.2)

I find that Android Studio's behavior with launching project files is inconsistent.我发现 Android Studio 启动项目文件的行为不一致。 If you don't have any project open and you launch a project's gradle.properties file with Android Studio, then it will open the whole project, BUT if you do this when another project is open then it will just open the gradle.properties text file in the already open project!如果您没有打开任何项目并且您使用 Android Studio 启动项目的gradle.properties文件,那么它将打开整个项目,但是如果您在另一个项目打开时执行此操作,则它只会打开gradle.properties文本文件在已经打开的项目中! However, for some reason this issue is avoided with settings.gradle -- it always opens the whole project even if another project is already open.但是,由于某些原因, settings.gradle避免了这个问题——它总是打开整个项目,即使另一个项目已经打开。

This problem occurs with macbook M1 macOS monterey. macbook M1 macOS monterey 会出现此问题。 I solved this by,我解决了这个问题,

  1. Open Settings in Android Studio在 Android Studio 中打开设置
  2. Select Edit Custom VM options.. Select 编辑自定义虚拟机选项..
  3. Add this line to it: -Dide.mac.file.chooser.native=false添加这一行: -Dide.mac.file.chooser.native=false
  4. Restart Android Studio重启Android Studio

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM