Flutter创建新项目运行报错

报错

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\����\test_flutter\android\app\build.gradle' line: 2

* What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
   > 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.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 14s
Error: Gradle task assembleDebug failed with exit code 1

翻译一下,大概是项目不能存在中文目录之下:

失败:构建失败并出现异常。

*所在:
构建文件“E:\ \ \test_flutter\android\app\ Build”。Gradle ' line: 2

*哪里出了问题:
应用插件请求时发生异常[id: 'com.android.application']
应用插件'com.android.internal.application'失败。
>项目路径包含非ascii字符。这很可能导致在Windows上构建失败。请将您的项目移到另一个目录。详见http://b.android.com/95744。可以通过添加“android”行来禁用此警告。overridePathCheck=true'来gradle。属性文件中的项目目录。

*试一试:
>使用——stacktrace选项运行以获取堆栈跟踪。
>使用——info或——debug选项运行以获得更多的日志输出。
>运行——scan以获得完整的见解。

*在https://help.gradle.org获得更多帮助

建造在14秒内失败
Gradle任务assembleDebug失败,退出代码为1

解决:

1.把项目移到非中文目录之下;

2.把中文目录修改为英文目录。

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值