Android报错 Failed to apply plugin [id ‘com.android.internal.application‘]

今天打开项目运行出现两条错误:

1、org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id ‘com.android.internal.application’]
2、org.gradle.api.tasks.StopExecutionException: 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.

这是因为我的项目外层文件夹有中文,所以报错了以上错误。

解决办法如下:
在gradle.properties文件中设置:

android.overridePathCheck=true

在这里插入图片描述
配置完成后,刷新一下就可以了。

猜你喜欢

转载自blog.csdn.net/weixin_58159075/article/details/124400903
今日推荐