Install Android Studio in / opt on Linux (move 1.9 GB ~ / Android / Sdk to / opt)

I downloaded the new Android studio IntelliJ IDEA - android-studio-ide-135.1641136-linux.zip .

I unzipped the zip file to /opt/android-studio (it was unpacked to 425 MB) and /opt/android-studio/bin/studio.sh , which launched the installation wizard, which set the data to 1.9 GB on ~/Android/Sdk . After that, the start of studio.sh now starts with Android Studio.

I want to move ~/Android/Sdk to /opt/android-sdk so that it can be used by all users. In addition, users cannot access records because they are located in the root partition.

So is this possible?

+6
source share
2 answers

It is intended for installation for each user, and not for all users, the main reason is that individual users can add / update their SDK components at their discretion - new versions of things are released quite regularly. It would be painful if the user asked the administrator to add the missing API level or get an update. In addition, depending on how safe you are, it may not be convenient for you to manage the Android SDK manager as root at all.

If this is not important for you, you can copy / move the SDK directory to your last home; You do not need to run the installer to place it there. In addition to updates, the SDK does not write anything in its installation directory, so it should work after copying there.

Having said all this, Android tools also have a custom .android directory in the .android 's home directory. They cannot be shared between users as they contain preferences for each user and AVD, etc. Because of the latter, unfortunately, this directory can become quite large.

+7
source

unzip Android Studio in / opt and then just

 sudo chmod 777 /opt/ 

If you are the only person who uses your car, that’s fine.

-5
source

Source: https://habr.com/ru/post/981175/


All Articles