AS——打开项目遇到Your project path contains non-ASCII characters

本文记录了在使用AndroidStudio时遇到的中文路径错误问题,详细介绍了错误原因及两种解决方案,包括修改文件夹名称为英文和在gradle.properties中添加特定行以禁用警告。

记录一次Android Studio的导入报错,最近帮朋友搞一个项目,我把压缩包名称弄成了中文,他在解压直接在那个文件夹打开了遇到编译器提示:

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 adding the line 'android.overridePathCheck=true' 
to gradle.properties file in the project directory.

这个错误就是我朋友在打开的路径含有中文的时候才会出现的,解决办法有两种:

  1. 把文件夹名称改成英文重新打开;
  2. 上面的编译的错误提示其实有给出解决办法的,This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.看这句,翻译成中文是可以通过添加行“android.overridePathCheck=true”禁用此警告到项目目录中的gradle.properties文件。
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值