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

5

6

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:

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

Monachism answered 10/3, 2018 at 19:3 Comment(0)
M
7

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

Monachism answered 7/9, 2018 at 9:10 Comment(0)
M
1

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!

Mccormick answered 12/5, 2020 at 23:25 Comment(0)
A
0

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.

Alcoholism answered 10/3, 2018 at 19:53 Comment(1)
Thank you for your answer! Tried this from command line and the junction file was created on disk C:but when I click on it trying to jump into directory, I get the error message: file not found. I guess the problem is in non-ASCII characters in the path eitherMonachism
M
0

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.

Misericord answered 6/7, 2020 at 10:2 Comment(0)
D
0

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.

Dunstable answered 24/9, 2020 at 14:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.