15

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.

Dici
  • 25,226
  • 7
  • 41
  • 82
Frank Contreras
  • 151
  • 1
  • 1
  • 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? – poss Aug 23 '15 at 22:26
  • 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. – Frank Contreras Aug 23 '15 at 23:34
  • What is your path? Surely the android studio is not making the problem up? – poss Aug 24 '15 at 06:04

13 Answers13

23

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.
Nana medo
  • 263
  • 2
  • 6
  • 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... – Rémi P Feb 01 '20 at 21:07
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"

Clézio Santos
  • 487
  • 6
  • 4
8

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

CaryMax
  • 81
  • 1
2

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

Shuai Wang
  • 335
  • 1
  • 8
  • 20
2

Your project path contains Chinese characters,

em: F:\资料\Yourproject

Please rename the path English characters:

em: F:\Data\Yourproject

Tamic
  • 81
  • 1
  • 1
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.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
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!

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
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

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.

Neveroldmilk
  • 124
  • 1
  • 5
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.

René
  • 1
0

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

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.

Javier C.
  • 7,859
  • 5
  • 41
  • 53
-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.

dhfg
  • 1
  • 3