嗨,我在 android studion windows 10 中遇到此错误,有什么解决方案吗?
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\acer\StudioProjects\untitled2\android\settings.gradle' (C:\Users\acer\.gradle\caches\7.5\scripts\3d075fs9hjp81ny0sgym4v09w).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63
* 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 919ms
Exception: Gradle task assembleDebug failed with exit code 1
尝试如下:
转到wrapper目录android >> gradle文件夹。
删除gradle-wrapper.jar文件
编辑gradle-wrapper.properties文件
同步项目
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip or latest