gradle Cordova显示已弃用的sdk,而sdk是最新的无法构建

az31mfrm  于 2023-04-21  发布在  其他
关注(0)|答案(1)|浏览(208)

SNAPSHOT

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\andre\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Users\andre\AppData\Local\Android\Sdk

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not open proj generic class cache for build file 'C:\Users\andre\OneDrive\Desktop\FlopyBierd\platforms\android\wrapper.gradle' (C:\Users\andre\.gradle\caches\8.0.2\scripts\denkdot30v7pdtkn4t1rxjrd0).
   > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 64

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.0.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 889ms
Command failed with exit code 1: C:\gradle-8.0.2\bin\gradle.BAT -p C:\Users\andre\OneDrive\Desktop\FlopyBierd\platforms\android wrapper -b C:\Users\andre\OneDrive\Desktop\FlopyBierd\platforms\android\wrapper.gradle

C:\Users\andre\OneDrive\Desktop\FlopyBierd>

每个仓库都是最新的,这是一个新生成的项目,但我仍然得到这个错误

9o685dep

9o685dep1#

只需添加一个新的env/系统变量ANDROID_SDK_ROOT,其值为C:\Users\andre\AppData\Local\Android\Sdk,并删除弃用的ANDROID_HOME

相关问题