今天打开项目运行出现两条错误:
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文件中设置:文章来源:https://www.toymoban.com/news/detail-562997.html
android.overridePathCheck=true
配置完成后,刷新一下就可以了。文章来源地址https://www.toymoban.com/news/detail-562997.html
到了这里,关于Android报错 Failed to apply plugin [id ‘com.android.internal.application‘]的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!