Cordova 构建失败:已弃用 Gradle?

问题描述 投票:0回答:1

我正在尝试使用 cordova 创建一个 Android 混合应用程序。 我对此了解不多,我只是在 www 文件夹下创建基于 Web 的文件并运行 cordova 命令,我希望它能够工作。但是,这次我收到了此消息,但我不知道如何解决它。 你能帮我一下吗?

D:\Users\Manolo\Documents\AppsAndroid\MusicTimeline>cordova build android
    Checking Java JDK and Android SDK versions
    ANDROID_HOME=C:\Users\Manolo\AppData\Local\Android\sdk (recommended setting)
    ANDROID_SDK_ROOT=undefined (DEPRECATED)
    Using Android SDK: C:\Users\Manolo\AppData\Local\Android\sdk
    Subproject Path: CordovaLib
    Subproject Path: app

FAILURE: Build failed with an exception.

* Where:
Script 'D:\Users\Manolo\Documents\AppsAndroid\MusicTimeline\platforms\android\CordovaLib\cordova.gradle' line: 75

* What went wrong:
A problem occurred evaluating script.
> No usable Android build tools found. Highest 33.x installed version is 29.0.2; Recommended version is 33.0.2.

* 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 8.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/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 669ms
Command failed with exit code 1: D:\Users\Manolo\Documents\AppsAndroid\MusicTimeline\platforms\android\gradlew -b D:\Users\Manolo\Documents\AppsAndroid\MusicTimeline\platforms\android\build.gradle cdvBuildDebug
android cordova hybrid-mobile-app
1个回答
0
投票
No usable Android build tools found. Highest 33.x installed version is 29.0.2

您需要打开Android Studio并安装build-tools v33+。现在您已经安装了 29.0.2,它需要 33。

© www.soinside.com 2019 - 2024. All rights reserved.