close
我的環境配置:Windows 10、 Android Studio 2.1.2。
 
錯誤訊息為:
Error:(2, 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.
 

image01.jpg

 
 
原因是 Android Studio 專案路徑包含中文!
 
我的專案放在 "C:\Users\xxx\Desktop\Test\新增資料夾\Test\app\build.gradle",所以它會抱錯。
因為路徑包含了中文字 "新增資料夾"。
改成英文後就沒問題了,例如 "C:\Users\xxx\Desktop\Test\Folder\Test\app\build.gradle"。
 
所以記住專案路徑不能包含中文!不管什麼開發軟體的專案都一樣,避免發生不可預期的錯誤。
 
arrow
arrow
    文章標籤
    Android Studio Error
    全站熱搜

    岳 發表在 痞客邦 留言(0) 人氣()