android - 检测到 Ionic 3 Android Studio

标签 android angular gradle ionic3

我无法在 Android 设备上运行 Ionic 应用程序,也无法构建 apk。

我可以在同一台电脑上构建并运行另一个 Android 应用程序。但我无法构建新的应用程序。我陷入了这个错误。

我试过了,

  • GradleBuilder.js --> 2048m 到 512m
  • 我添加到“环境变量”_JAVA_OPTIONS -Xmx512M
  • 我重新安装了 gradle 4.6

抱歉,英语不好。感谢您的帮助!

    PS D:\Projects\Ionic3\AuthServiceEx> cordova run android
Android Studio project detected
ANDROID_HOME=C:\Users\[USERNAME]\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_181
studio
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org
cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

最佳答案

您是否尝试在您的项目中重新安装android平台? 如果不起作用请尝试以下操作: ionic android build - not enough memory to start jvm

关于android - 检测到 Ionic 3 Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52734865/

相关文章:

java - Gradle附加zip存档

android - 一个LinearLayoutManager只能对应一个RecyclerView?

java - 如何在Android项目中使用Java中的weightSum?

android - 在 webview 中看不到 onReceivedError

Angular 在使用指令时给出@angular/core 404 not found 错误

angular - 在Angular服务中频繁使用BehaviorSubject是一个危险信号吗?

android - 完全离线配置gradle

android - 在新的 Android Studio 3.1 上构建时出错

javascript - 如何在 Angular 8 应用程序中使用 jQuery?

node.js - 如何从gradle任务中打开allure?