14

I am getting the error "The application Android Studio can't be opened" after updating my MacBook Pro to latest version 10.13.4 I am using Android Studio 3.1 I can open all the applications on my Mac except for Android Studio. I have searched on internet and couldn't find any related answer for this problem. Please help?

Fatih Taşdemir
  • 266
  • 1
  • 5
  • 15

8 Answers8

12

I had this issue and it seemed to be caused by comments in my studio.vmoptions file

~/Library/Preferences/.AndroidStudioX.X/studio.vmoptions

Once I removed the comments, I was able to open Android Studio again.

CACuzcatlan
  • 5,407
  • 8
  • 41
  • 59
  • I was unable to launch Android Studio on macOS High Sierra 10.13.6 (app icon bounces about 6 to 7 times, then disappears). This finally fixed it. I also deleted any other installed AndroidStudio folders within `~/Library/Preferences/` that I wasn't using. Thanks so much! – VIN Sep 19 '18 at 18:00
  • delete ~/Library/Preferences/AndroidStudio* – display name Dec 18 '18 at 07:33
11

I've just fixed it by removing the studio.vmoptions file.

> rm /Users/{user}/Library/Application\ Support/Google/AndroidStudioPreview4.2/studio.vmoptions
jox
  • 2,218
  • 22
  • 32
8

In my case I had to do:

sudo chmod 644 /Applications/Android\Studio\Preview.app/Contents/Info.plist 

because it had -rw------- permissions instead of -rw-r--r--@

Nietoperek
  • 81
  • 1
  • 1
  • That solved my problem. I had Android Studio installed by another admin user and with my current user it wouldn't open. – dsdebastiani Oct 30 '21 at 22:15
  • For some reason, my VirtualBox will not able to start any VM once a while. Running `sudo chown -R root:wheel /Applications` will solve it. But this seems has cause problem in Android Studio. Now another `chmod` command to solve another problem. Thanks. – John Pang Nov 07 '21 at 10:08
  • Of all the above this worked for me for – Inder Kumar Rathore Jun 03 '22 at 04:04
5

I faced the same issue, which I solved by below steps :

  1. Delete Android Studio completely from your mac
  2. Install through the command :
    brew install --cask android-studio
    
Jamaludeen MA
  • 77
  • 1
  • 9
  • This method worked for me. I installed from downloading the dmg from the google website and had no existing preferences to delete. I much prefer having this tracked in brew with everything else. – Caleb Fenton Mar 18 '22 at 18:34
1

Solution :- if you are facing this error “The application Android Studio can't be opened” or LSOpenURLsWithRole() failed with error -10810 for the file /Applications/Android Studio.app.

Then try

Go To Applications -> Tap on **Android Studio -> Show Package Contents -> Contents

Now copy the jdk version from jre -> jdk -> contents ->open info.plist -> copy Bundle version's value

then come back to main Contents Folder ( Android Studio -> Show Package Contents -> Contents ) and open info.plist -> JVMOptions -> JVMVersion and add/paste in its value and save and exit.

Now, You will be able to open Android Studio. :)

Pujan Shah
  • 19
  • 1
1

If anyone is facing this issue, locate your Android Studio configuration files.

~/Library/Application Support/Google/AndroidStudio<Version>

In my case, maximum heap size set by default was 20MB, which was too low. I was getting the same above error for Android Studio Preview. I modified it to 256MB, Android Studio Preview started normally.

To change maximum heap size, go to the configuration file -> studio.vmoptions

Example: from -Xmx20m to -Xmx256m

increase the heap size to higher value.

The studio.vmoptions file allows you to customize options for Android Studio's JVM. To improve Studio's performance, the most common option to adjust is the maximum heap size.

For more details

Note: Once Android Studio opens up, it might ask you to increase the heap size again.

Varsha Kulkarni
  • 1,389
  • 2
  • 13
  • 17
0

i had the same problem like you. there is something wrong with my home directory. it has been fixed.

sudo mkdir /Users/XXX/.android
sudo chown -R XXX:staff /Users/XXX/.android

good luck for you.

x.du
  • 1
  • 1
0

Use this command: sudo /Applications/Android\ Studio.app/Contents/MacOS/studio (sudo is important required)

After try some suggest but not help

- trying different versions (even beta or canary) from official and none-official sources
- updating, uninstalling and reinstalling the app
- trying jetbrain toolbox for installation
- updating jdk to latest version (19)
- changing configs in .vmoptions file or removing it (including-Dsun.font.layoutengine=icu)
- removing gradle,android sdk and etc folders related to android studio