android studio common sdk folder for all users - android-studio

I am using Android Studio 2.2.3 from two user accounts on Windows 10. Whenever I update plug-ins, it doesn't seem to have updated for all users. How to move make studio point to a common folder that can contain the sdk and apply all updates there?

Android Studio SDK is usually installed under C:\Users\%USER%\AppData\Local\Android\sdk folder. If you want to access it from different user, you should consider installing it on a different drive or configure & move your current SDK to a different drive. That should do the work.
Haven't tried yet but this should surely work.

Related

Your SDK location contains non-ASCII characters - no Android in Tools Menu

I've just downloaded and installed Android Studio but there is no Android submenu in Tools menu and no AVD Manager icon on the instrument panel. When I start SDK Manager, there is an error message:
Please specify a Android SDK location
SDK Manager screenshot: "Please specify a Android SDK location"
If I click on Edit link next to Android SDK Location field, there is another error message:
Your SDK location contains non-ASCII characters
SDK Components Setup screenshot: "Your SDK location contains non-ASCII characters"
I studied these somewhat similar questions, but non of them helped me:
Your project path contains non-ASCII characters android studio
Unable to install SDK tools component while installing Android Studio
unable to install or locate android sdk in android studio
NO Android option in "tool" menu, and no avd manager
I see that the path really contains non-ASCII characters, but is there any workaround other than uninstall Android Studio and then install it from scratch to some other directory like С:\Android\SDK?
UPD:
it seems there is no such workaround at this time
As a matter of fact at the moment there is no other way than to re-install Android Studio to some other directory with no non-ASCII characters and blank spaces, like С:\Android\SDK
I guess you've solved this by now but I ran into the same problem today and after a little research and some annoying tries I solved it. What I found out is this:
Using mklink function you can create a junction to a location but it will not boter if you are creating a it to a non existing location(that's the "file not found" you were getting). And you are creating a junction to a non existing location in this case due to C:\Users\username\AppData\Local\Android\Sdk should(not sure about this) be created by the Android Studio Setup Wizard during installation. In order to solve that, you should create \Android\Sdk in C:\Users\username\AppData\Local and it's done.
The installer does not show junctions to non existing locations in the Sdk install location so if you don't create the folders you can't select the link.
Finally but not less important, the installer does not allow the Sdk to be installed in a folder in the root directory C:\, so you have to create the junction in any other directory but the root one or move it if it's already there(that's what I did).
As I was writting this the installer was running and when it was done I came across the exact same problem with the location to store Android Proyects, and so the same solution to the installer must be aplied to the Save location in the New proyect step.
This is exactly what I did:
1) Create \Android\Sdk in C:\Users\username\AppData\Local\
2) Open cmd as admin and enter the following command:
mklink /J "C:\..\android-sdk" "C:\Users\username\AppData\Local\Android\Sdk"
It will return this:
C:\WINDOWS\system32>Junction created for C:\..\android-sdk <<===>> C:\Users\username\AppData\Local\Android\Sdk
Note: android-sdk is the name the junction will have, you can name it as you like and \..\ reffers to the folder where you want to put the it in, make sure there are no non-ASCII characters in the folder's name anyways.
3) In the Sdk install location, select C:\..\android-sdk and the installation will be ready to go.
4) Repeat the process for the Save location for new proyects, just instead of C:\Users\username\AppData\Local\Android\Sdk use the location you want the proyects to be stored in.
Didn't try moving the junctions files but I suggest you don't, I guess that could get the paths lost and mess up the installation.
Hope this is usefull and good luck with your proyects!
If you don’t want to reinstall the Android SDK in another location you can also create a junction point which is a link to the actual location. You can use the junction tool to do this.
For example, you can create the directory C:\Android and then create the junction SDK and claim the SDK lives there with
Junction C:\Android\SDK C:\Users\Whatever\actual\location
The operating system will show the same contents under both paths and applications will not know the difference.
Hey I had the same problem here but I was able to fix it by just changing the directory to a new folder directly on the hard drive.
Hope this can help.
In my case since I have a Windows 10 operating system, and my sdk was located in Program Files. Having spaces in the directory caused some sort of error, to solve this I used mklink to create a junction called android-sdk in the C drive that pointed at the directory where my sdk was located.
If you can't find the sdk in
C:\Users\username\AppData\Local\Android\Sdk
I suggest looking at
C:\Program Files (x86)\Android\android-sdk
then trying
mklink /J "C:\android-sdk" "C:\Program Files (x86)\Android\android-sdk"
Afterwards open Android Studio go to Project Defaults > Project Structure > Android SDK, click on the "..." button to browse for your sdk and select the junction you just created. Or if you still haven't setup android studio because of this issue, open the application as administrator select the theme settings and all that, and when you reach the setup sdk section, click on the "..." button to browse for your sdk and select the junction you just created.
Important to run Android Studio setup as administrator otherwise you may experience issues downloading components, if you still have issues it might be your antivirus blocking the setup.

How to develop Android Studio projects with different SDK paths

I happened to have two different Android SDK paths for different projects. Every time I launched a project with a different SDK path, Android Studio asked which path to use, and made the path a system-level SDK path. Is it possible to make Android Studio to use the locally defined SDK path by default? This will make developing multiple Android Studio projects with different SDK paths at the same time possible.

standalone sdk manager in Android Studio

Tools => Android => SDK Manager to open SDK manager, and then check the "Show Package Details" to see the the list of installed and not installed components.
I try to find "Sample" folder under individual Android version, but I just unable to find the "Sample" component. I am very upset because I want to install Gesture builder that is inside the "Sample" folder.
By accident, I click the "Launch Standalone SDK" to launch the screen that looks similar to the SDK manager on eclipse, and I find the Sample folder.
Anyone can tell me what the reason I am unable to find the Sample folder on opened SDK manager (there are 3 tabs: SDK Platforms, SDK Tools and SDK update Sites)
Thanks
You need to download the samples for the particular sdk you're targeting. Furthermore, samples change from sdk to sdk.
So first find out which sdk, did the Gestures Builder sample come from, and then download that samples for that sdk.
After that, use the Android Studio wizard to create a project from the sample. Just be sure to target the same sdk (you can always change that target sdk later, once you have the sample).
Using Android Studio is best way to do it. There is no need to go to the folder itself and do things manually.
Actually, GesturesBuilder seems to be very old, it's api level 4 (Android 1.6). No wonder you have trouble finding it. My suggestion would be not to bother with it and try to find a more recent project example directly from github.com

How to update Android Studio in Linux

I'm on Linux Mint KDE and want to update Android Studio. When I update PHPStorm (also a JetBrains product) the directory always has the version number so there is no overwriting. Android Studio does not. Do I just overwrite the old directory? Or delete it first? Or what?
Usually you can simply use the built in update function found in
Help -> Check for Update...
If it is not a small patch, but a larger update (happens from time to time) you need to download a new archive. For me it was always safe to remove (or rename) the old installation folder first since all your configuration settings are stored in
~/.AndroidStudio
anyways and Android Studio will automatically reuse these (or ask you if it shall migrate them).
I am using Android Studio for 2 years now and that was always working for me.
BTW: I use IntelliJ IDEA as well and it also has the version number in the installation folder.

Why is android studio downloading components again?

I changed my account from admin to other. why is android studio downloading components again. I downloaded everything previously... How to proceed?
You possibly used the default location for android sdk. You can move it, while the studio is turned off. The next time you start it, it will ask you to tell him where the new location is.
Also gradle wrapper downloads some other files, like gradle itsels. That is also stored for each user, but don't worry about this

Resources