When I check for updates in Android Studio (1.0.1) it says there is an updates available (1.0.2), but shows this error:
Android Studio does not have write access to /Applications/Android
Studio.app/Contents. Please run it by a privileged user to update.
When I try and open it as root, I get an error saying files are missing and it can't start up.
How am I supposed to update with these errors? Should I have installed it as a non-privileged user to start with?
EDIT: I STOPPED GETTING THIS ERROR SEVERAL VERSIONS AGO.
Open terminal and type: sudo chmod -R 777 /Applications/Android\ Studio.app/Contents/
As a few people have said, it's probably not best practice to give everyone permissions (using 777) to read, write and execute.
However, if you (like me) have multiple accounts on your personal computer it's perfectly okay to give everyone in the same group (using 775) permissions to read, write and execute.
sudo chmod -R 775 /Applications/Android\ Studio.app/
The error comes because a different user account installed Android Studio than is currently trying to update it. For example, I have a personal and work account on my BYOD computer, my personal account installed Android Stuido, but my work account wanted to update it. By default only the owner can write to the app folder. I needed both accounts to have write permissions, both accounts were in the admin group, so I gave write permissions to the whole group.
I would not change the permission set, but run the app as a super user and it worked.
sudo /Applications/Android\ Studio.app/Contents/MacOS/studio
I went though this issue after proceeding update on my Mac.
I think giving 777/775 is not the proper way .. security speaking !
Try to check your account by which you have logged in and the account Android Studio installed with.
Check current owner of Android studio
stat /Applications/Android\ Studio.app/
And check current user id and group you are using
Get current userID by:
id -u -n
Get current group by:
id -g
That will give you a clear idea where is the issue ... may be userId is different or group or both.
Then you have two options:
switch to other account by which Android Studio installed with ( the
one you see as output from 'stat' command ) by
sudo su [userID]
Next step to run Android Studio from command:
open /Applications/Android\ Studio.app/
Reset ownership of Android Studio to current account ( from id -u -n & id -g ) by
sudo chown -R [userID]:[group] /Applications/Android\ Studio.app/
Thats it ..
Check if your Android Studio is not running on a virtual drive, look on your desktop if there is a drive with Android studio, if you can see the drive, right click on it and press eject, then go to applications look for Android studio and run it from there and this should allow you to update.
Got the same problem. I wouldn't recommend giving full permissions to everyone on this folder.
In my case the issue was caused because the owner of the folder wasn't the current user.
You can check the user/group owner of the folder this way:
ls -l /Applications/Android\ Studio.app/
To change the user of the folder you can use chown.
Nothing worked for me , so just move the app to Application folder
try with sudo /Applications/Android\ Studio.app/Contents/MacOS/studio
The problem happened for me because the android studio not in Applications folder. you need to add android studio to applications folder and it will work.
I followed this solution:
https://www.youtube.com/watch?v=15OLD22wDzE
On your mac
go to applications
right click on Android studio
in the permissions section give everyone read-write access
and restart android studio
Related
I've built an App in Xcode in release mode. Is signed with valid Developer ID certificate. And the app launches fine on some MacBooks.
But on another launch fails with error
The application %name% can't be opened.
Then I try to launch it from terminal with open command it says
LSOpenURLsWithRole() failed with error -54 for the file /Applications/Gaetano Lunches.app.
And then I try to launch directly the binary file from package contents
it says
-bash: /Applications/Gaetano Lunches.app/Contents/MacOS/Gaetano Lunches: Operation not permitted
On all MacBooks app installation from Anywhere is allowed. spctl-master is disabled. Permissions for files are correct. But the app cannot be launched.
I don't know how you are building your app, but if LSOpenURLsWithRole is returning permError = -54, this means you have a permission error on opening a file. This can mean a lot of things, but building an app in release mode is no longer what Apple recommends for you to do. Apple prefers that you use Archive and then you export the app in Organizer to be used by your users. By using this work flow, normally you can do everything using the Xcode defaults for building an app. If you don't, then you need to be more careful with the settings you choose for building in release mode.
For a quick and dirty approach, I would try the following:
1) Open the terminal
2) Type: chmod +x "/Applications/Gaetano Lunches.app/Contents/MacOS/Gaetano Lunches"
3) Try to launch your app and see if it helps. If it helps, there is something messed up with your build settings, which is failing to change the file permissions somewhere for your executable to have the right permissions to be launched.
Another thing you could try is see whether your app was blacklisted by Gatekeeper, because somehow it determined your app is doing suspicious things on your own system. If that is the case, then you can try this to see what gatekeeper is assessing:
spctl -a "/Applications/Gaetano Lunches.app"
If for some weird reason you app is being blacklisted by Gatekeeper, you can always add your app manually and whitelist it for Gatekeeper:
spctl --add "/Applications/Gaetano Lunches.app"
If all fails, you can try to reset the whole database, but you will need super user access:
sudo spctl --reset-default
However, I think these are just quick fixes, and if you keep needing this is because your build settings in Xcode must be adjusted. More on that, if any of these solutions work. Let me know about that.
I have downloaded android stdio setup from android developer site i.e. https://developer.android.com/studio/?hl=ja#downloads of version 3.1.2.
When I started the installation, it ask for copy android stdio to "Application" folder. when I do that mac give error like
"The operation can’t be completed because you don’t have permission to access some of the items."
Please let know how to install.
I also faced similar issue.
Solution:-
Drag it to Desktop. Then move it to Applications folder. and it will work fine.
Best of luck
I tried the above solution and it did not work. I got it to work by accident. The last action i did was:
Drag the .dmg into the Applications folder, and back into Downloads
Drag the Android Studio icon into Applications and it worked.
I had similar issues.
First, repair disk permissions with Disk Utility, for both volumes!
If that doesn't fix the problem, then right-click (or control-option-left click) on the folders. Then select Get Info, and then check the Sharing & Permissions for them. There you want to see Read & Write, in case you see Read Only, then change it!
Source: https://discussions.apple.com/thread/3002619
Problem:
Had the same issue with the installer getting to 528MB and then the same error as in your screenshot:
"The operation can't be completed because you don't have permission to access some of the items."
Solution:
I was installing version 3.1.4 so change the below so that the paths are correct:
sudo rsync -rvzPKh /Volumes/Android\ Studio\ 3.1.4/Android\ Studio.app /Applications/
That will copy all the files into place, but you will still get an error related to a missing dylib if you try launch via terminal.
For some reason there is a symlink that does not get copied over so we have to patch that:
cd /Applications/Android\ Studio.app/Contents/jre/jdk/Contents/MacOS
sudo ln -s ../Home/jre/lib/jli/libjli.dylib libjli.dylib
Now just launch the app from Applications as you usually would. That should get you moving.
Also:
Personally, I've been having other issues with my other intellij platforms like PyCharm and WebStorm that give me an error intermittently when I try to launch them. Namely a popup containing:
Start Failed: Internal error. Please report to https://code.google.com/p/android/issues
java.lang.ClassNotFoundException: com.intellij.ide.plugins.PluginManager
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:227)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:36)
at com.intellij.idea.Main.main(Main.java:83)
However since I feel this issue is specific to me I think it might work for some of you out there. Would be interested to know if this works for anyone, please let me know in the comments.
I have the same problem yesterday and here's how I solve it today.
open the terminal.app
enter "sudo spctl --master-disable" and enter the password
System Preferences -> Security & Privacy -> Allow apps downloaded from: -> select "Anywhere"
install again, and it will be fine.
I am trying to add Apple developer account in Xcode Account Preferences and its giving below error.
"This action could not be completed. Try again."
I tried different Wi-Fi connections, Different Xcode Versions.
After removal of Apple Id, I am not able to add it again.
Your help could save my time as I am not able to Upload App on store.
If you using
sudo mkdir -p /Users/Shared
sudo chown root:wheel /Users/Shared
sudo chmod -R 1777 /Users/Shared
does not work. Update lastest itunes(for now 12.7.3)
You just need to remove the device on iCloud. You can do it with your iPhone in the settings -> profile -> devices list -> macbook -> remove
or visit icloud.com and remove the device there
Make sure your iTunes is up to date. Out of the blue I couldn't sign in on my Mac into iCloud anymore, no matter wether it was System preferences, iTunes or Xcode. Changing permissions on /Users/Shared didn't help. I was about to give up and reinstall mac OS. Then I updated iTunes and - and voila, it worked again!
I have successfully installed Genymotion and Virtualbox ,but not able to create virtual devices. virtual device is complete download but file is corrupted, not only one but all
If your are using Ubuntu, I just found the soluction!
Run Genymotion as a SUDO. To do that, open your terminal, go to the Genymotion folder and type:
sudo ./genymotion
Now go and download your Virtual Machine!
Hope it works for you too
I am running genymotion on Mac OS X 10.9.2 and must run Genymotion via sudo.
I created a bash script that I run:
#!/bin/bash
sudo /Applications/Genymotion.app/Contents/MacOS/genymotion
I've named the script run-genymotion.sh.
Make sure to chmod +x ./run-genymotion.sh so it is executable.
Then ./run-genymotion.sh to execute the script via terminal.
If you work in some company and your company has cyberroam configured on it, i.e., if there is restricted access for downloading, then you just need to enable downloading on your system. As I was also having this issue, I had downloaded Genymotion(no restriction occur using 'https') but at the time of downloading for the virtual device its showing message for corrupt files, so just enabled download rights from network admin, then it started to download. I had done full installation process 2 times and both the times the first full download(both times) also showed the same 'corrupt files' message but the second download(both times) succeeded.
Check, in case, if it helps!
This happens because you've ran genymotion for the first time as root.
fix it this way :
sudo rm -rf ~/.Genymobile
and now try again to install a virtual device.
Here's how I did mine. Every single virtual device I downloaded in Genymotion, I was told it is corrupted. What is wrong with Genymotion?
Well, TL;DR, locate the downloaded file, open and run with Virtualbox first time, and come back to Genymotion to run it.
Via nautilus, or your file manager, go to ~/.Genymobile/Genymotion/ova
Double click on the .ova file to open in VirtualBox (or right click and Open with VirtualBox)
You should see the genymotion virtual device listed in the list of Virtual devices in your VirtualBox
Try starting the genymotion virtual device in VirtualBox. You should end up with a terminal prompt after boot.
Do reboot -p shutdown to close the terminal
Open genymotion (I do mine as ~/Developments/Genymotion/genymotion/genymotion)
You should see a virtual device listed in Genymotion
Start it, and you're done.
You may execute genymotion using sudo or change file permissions of genymotion and it's files with:
chown -R username:username /path/to/genymotion
Also change file permissions of the deployed images and cached ova files which are probably in ~/.Genymobile/Genymotion
I'm using genymotion on windows and had the same problem.
I've just changed Virtual Prices Path from C drive to D drive (just another drive) and the problem solved.
These steps work for me:
clear cache file in genymotion settings/misc/clear cache
restart genymotion with admin privilleges
When I try to search the documentation within Xcode I get the following error:
“index.html” is locked for editing and you may not be able to save your changes. Do you want to unlock it?
“index.html” is currently locked because it does not support editing.
The file “index.html” could not be unlocked.
Could not add write permission to the file because you do not own it. Try modifying the permissions of the file in the Finder or Terminal.
I have tried uninstalling and reinstalling without success.
Any ideas?
Here's a solution I found on Apple's DevForums:
I went into Xcode preferences, went to the Downloads option, and
selected Documentation. From there, I clicked 'Check and Install Now'
and it went and downloaded the iOS 5.0 library and 10.7 library. Once
those were downloaded, help seemed to be working again via the local
libraries. Hope this helps get you back on track.
And yes, I've seen the same problem that you've seen. You just need to fully download the documentation.
Update: xCode 4.2.1 fixes this problem.
I worked around the issue in Snow Leopard this way:
Open XCode
Open the organizer ( Window | Organizer )
Select Devices | Provisioning Profiles
Select my phone-provided provisioning profile and click Refresh
You do this silly thing because XCode will then display a dialog asking you to sign in with your Apple ID. If I sign in /here/ instead of on the page in the documentation, it remembers I'm signed in, shows the documentation when I ask, and doesn't crash. I have to do this every time I restart XCode, though.
YMMV.
Simple answer... Have you tried repairing permissions?
How about deleting xCode prefs?
You can chown the documentation to your user, attempt to search, unlock the file, and then chown the documentation back.
Unfortunately, you have to search and unlock for each file individually.
sudo chown -R `id -un` /Library/Developer/Shared/Documentation/DocSets
# Try to search; unlock the file.
sudo chown -R _devdocs /Library/Developer/Shared/Documentation/DocSets
I don’t think it actually modifies the file — I suspect this is a problem with the new versioning feature.
This has helped:
Become super user
% cd /Library/Developer/Shared/Documentation
% tcsh
foreach i ( `find . -name index.html` )
echo $i
xattr -d com.apple.quarantine $i
end
I still get the following on the first search:
Internal Error
Xcode encountered an internal logic error. Choose
"Continue" to continue running Xcode in an inconsistent
state. Choose "Crash" to halt Xcode and file a bug with
Crash Reporter. Choosing "Crash" will result in the loss of
all unsaved data.
[Show Details] [Continue] [Crash]
I pick [Continue] and everything works fine afterwards.
the Better solution is Uninstall Xcode:
sudo /Developer/Library/uninstall-devtools –mode=all
after that, install Xcod