Your project path contains non-ASCII characters android studio
Asked Answered
R

13

16

I was installing android studio, but I have this problem when the program is starting:

Error:(1, 0) Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details.

This warning can be disabled by using the command line flag -Dcom.android.build.gradle.overridePathCheck=true, or adding the line 'com.android.build.gradle.overridePathCheck=true' to gradle.properties file in the project directory.

Rebatement answered 23/8, 2015 at 21:58 Comment(3)
So, the error message is pretty self explanatory. What is your project path and what part gives you trouble to understand what is going on?Vesting
I had another problem before, so I found that the only solution was to completely erase the android studio, so when I reinstall the program again, it came out that problem with the project path. Note that before when my android studio worked, I used the same path for my projects, now I don't know, what is the reason of the problem.Rebatement
What is your path? Surely the android studio is not making the problem up?Vesting
P
26

I solved this issue by adding this line

android.overridePathCheck=true

to

gradle.properties

As this message said

This warning can be disabled by using 
the command line flag -Dcom.android.build.gradle.overridePathCheck=true,
 or adding the line 
'com.android.build.gradle.overridePathCheck=true'
 to gradle.properties file in the project directory.
Peggy answered 19/8, 2017 at 11:57 Comment(1)
After one full day having "ASCII Open File" Error, this fixed my problem ! Thank you so much, it is just unbelievable that AS does not support ASCII on path... On AS 3.5 in 2020...Incense
M
10

I did create a symbol link (c:\android-sdk) in windows 10 and resolved:
mklink /D "c:\android-sdk" "C:\Users\Clézio\android-sdk"

Mullion answered 27/8, 2016 at 10:24 Comment(0)
B
9

I have the same problem.then I create a new project and the path only use English alphabet,the problem is resolved.

Bechler answered 26/8, 2015 at 2:32 Comment(1)
Non english alpabet was my problem ;)Busch
C
2

I meet this problem and find there are some Chinese characters in my path. After change these characters into English , the problem solved.

Casserole answered 26/11, 2015 at 11:56 Comment(3)
Can you elaborate a bit more?Glint
maybe your project in a directory which named in Chinese,change its name to English.Casserole
It is good to edit your answer to add extra details. Comments don't serve this purpose.Glint
L
2

Your project path contains Chinese characters,

em: F:\资料\Yourproject

Please rename the path English characters:

em: F:\Data\Yourproject

Luca answered 19/12, 2016 at 8:54 Comment(0)
C
2

If you face with the problem at the first time installing Android Studio on your computer.

  1. mklink /D "c:\Android-Sdk" "C:\Users\ **YOUR-USERNAME** \AppData\Local\Android\sdk"

  2. Go to "C:\Users\ YOUR-USERNAME \AppData\Local\" path and create Android\sdk folders inside it.

  3. After that you can continue installation.

Cataphyll answered 31/12, 2017 at 4:45 Comment(0)
O
1

What I actually did was redirect (I don't actually know the term) the path to my other user (my path was C:\Users\Keith Peñas\ etc.) then, I thought that I had this Spanish letter on, so I redirected the path to my other user, in this case it was (C:\Users\Keith). Then I had another problem: it was somewhat like "Your path cannot be with the rooted path". So I made a folder with the name of my app and then it worked!

Another problem I encountered was: "your path contains white space etc." and it was from my other disk.

Hope this helps!

Ophthalmia answered 29/12, 2017 at 13:33 Comment(0)
V
0

The path location must not contain á,à,â, and similars. Chinese characters or any other diferent than the usual alphabetical characters. For example, my path was C:\Users\Vinícius\AndroidStudioProjects\MyApplication .But my user name had the letter í. So I create a folder 'custom2222' and change the path to C:\custom2222\MyApplication

Vitia answered 3/6, 2016 at 17:42 Comment(0)
D
0

I also encountered this problem, and I have to change the folder name from Chinese to English. Pity that current gradle build tool does not support Unicode names.

Deron answered 16/9, 2016 at 6:55 Comment(0)
L
0

I created a symbol link like described by Clézio before. However, I had to specify a suitable encoding (e.g chcp 65001) in command line before.

chcp 65001
mklink /D "C:\android-sdk" "C:\Users\René\AppData\Local\Android\sdk"

If you have your SDK installed under Path C:\Users[USER]\AppData... you may have to run command line with administrativ priviledges.

Lubricator answered 23/12, 2016 at 6:42 Comment(0)
M
0

This error occur because of path of project. Change your project path wiht way which dont contain nonAscii character.

Mountainous answered 19/12, 2018 at 11:31 Comment(0)
A
0

The best solution to your problem is to move your project folder to other directory with no non-ASCII characters and blank spaces.

For example С:\Android\PROJECT-FOLDER.

You can create the directory in C:\ using the name that you want.

Arzola answered 4/11, 2019 at 10:1 Comment(0)
G
-1

I've face this problem so I create my projetc in a different path, then move to the location where the other projects are, after looking to gradle files, I've notice that my newer project have this:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

The classpath of my newest project's gradle is 1.5.0, and the other projects ar 1.2.3, Than I've made the changes and so far so good, everthing is working fine until now.

Gonzalo answered 3/2, 2016 at 12:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.