赞
踩
在上安卓Android课的时候,用自己的Android Studio打开老师发的项目文件,报错出现
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
和
Unsupported Java.
Your build is currently configured to use Java 17.0.6 and Gradle 6.7.1.
Possible solution:
- Upgrade Gradle wrapper to 7.2 version and re-import the project
的问题,自己查阅资料百度出的解决方案,感觉挺有成就的,在这个记录一下。
(如果下载Gradle速度过慢,可以手动下载,具体请跳转至:Android Studio手动下载Gradle文件放到指定目录_gradle下载后应该放在哪个文件夹-CSDN博客https://blog.csdn.net/u011046452/article/details/107529346
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
和
Unsupported Java.
Your build is currently configured to use Java 17.0.6 and Gradle 6.7.1.
Possible solution:
- Upgrade Gradle wrapper to 7.2 version and re-import the project
这是因为Java和Gradle的版本不匹配导致的,查看版本对应关系可跳转至:
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin 'com.android.internal.application'.
和
Caused by: 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
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。