如何为Android构建离子Cordova?

发布于 2025-02-10 13:36:59 字数 1967 浏览 0 评论 0原文

我是Ionic的新手,我想在Android平台中模仿离子,而不是在浏览器中运行它。但是我在“ Ionic Cordova构建Android” 使用VS代码期间遇到了这个错误。

请找到以下详细信息:

> cordova.cmd requirements android

Requirements check results for android:
Java JDK: installed 18.0.1
Android SDK: installed true
Android target: installed android-33,android-30
Gradle: installed C:\Gradle\gradle-7.4.2\bin\gradle.BAT

实际错误:

> Task :app:processDebugMainManifest FAILED                                                                            

FAILURE: Build failed with an exception.                                                                               

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @5cb1c671

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

BUILD FAILED in 7s
17 actionable tasks: 17 executed
Command failed with exit code 1: E:\Ionic\Projects\NirogalayaFoundation\platforms\android\gradlew cdvBuildDebug -b E:\Ionic\Projects\NirogalayaFoundation\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.
        
        cordova.cmd build android exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

请帮助我。

I am new to Ionic and I want to emulate Ionic in an Android platform rather than to run it in a browser. But I am stuck with this error during "ionic cordova build android" using VS CODE.

Please find the following details:

> cordova.cmd requirements android

Requirements check results for android:
Java JDK: installed 18.0.1
Android SDK: installed true
Android target: installed android-33,android-30
Gradle: installed C:\Gradle\gradle-7.4.2\bin\gradle.BAT

Actual Error:

> Task :app:processDebugMainManifest FAILED                                                                            

FAILURE: Build failed with an exception.                                                                               

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @5cb1c671

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

BUILD FAILED in 7s
17 actionable tasks: 17 executed
Command failed with exit code 1: E:\Ionic\Projects\NirogalayaFoundation\platforms\android\gradlew cdvBuildDebug -b E:\Ionic\Projects\NirogalayaFoundation\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.
        
        cordova.cmd build android exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

Please help me out.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文