简体   繁体   中英

Android Studio Can't Open Existing Projects

I cant open any of my existing projects on android studio for some reason, I can create a new project but any time i try and open an exiting one it opens the file finder i click on the project and nothing happens.

Ive tried invalidating and clearing cache, uninstalling all plugin, deleting, re-downloading and re-installing but nothing seems to be working

Im running macOS Catalina 10.15 and Android Studio 3.4.2

Image

Just to summarise (and make it clear) there are 3 different options to solve this.

  1. From within Android Studio if you can open it...

    • Click the menu item Help->Edit Custom VM Options...
    • In the editor studio.vmoptions that opens up, add the following, save and restart Android Studio
-Dide.mac.file.chooser.native=false
  1. Via Mac OS X Terminal window, type
open -a /Applications/Android\ Studio.app "path to your project"

You can get the path to your project by going into the project directory and typing,

pwd
  1. From Mac OS X Finder

    • locate the folder for the Android Studio project that you want to open.
    • drag the folder to the Android Studio App (from Applications or from the Dock if it is there)

There is something wrong with androdi studio in macOS Catalina , so you can not open exist project or import project in android studio . But as an alternative , you can open project in command line, like below

$ open -a /Applications/Android\ Studio.app "path to your project"

Drag the project folder and drop on Android studio icon in the dock to open the project. Since its beta we have to wait for a fix from Apple or Jetbrains.

Android Studio 3.4.2 is probably not optimized for macOS Catalina. Try downgrading to macOS Mojave. It's what I use and it's working fine.

Stay clear of beta versions - not everyone develops against beta versions.

See my answer at, IntelliJ IDEA can't open projects or add SDK on macOS Catalina , I think it also works for Android studio.

Mac OS, Mojave or Catalina, Exit Android studio first,

  • Apple menu  > System Preferences, click Security & Privacy, then click Privacy.
  • Click the lock, then enter your administrator password.
  • From the list of items on the left, select Full Disk Access.
  • Add Android studio(or other whatever app having this problem) to the apps allowed full-disk access by using the add button.

Lock and try again.

I hope this will help.

Ref from apple support of other things, but I tried, it works!

Might be a late response. This answer is for having issues with 4.x not launching on macOS after upgrade or uninstall and reinstall.

rm -rf ~/Library/Application Support/Google/AndroidStudio{PREVIOUS_VERSION}

Example: rm -rf ~/Library/Application Support/Google/AndroidStudio4.1

https://developer.android.com/studio/known-issues#studio-config-directories

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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