简体   繁体   English

无法获取离子来构建Android APK

[英]Cannot get ionic to build android apk

I have problems getting ionic to build a proper android apk. 我在获取离子以构建适当的android apk时遇到问题。

The ionic code is alright because I can build a proper apk on another PC. 离子代码没问题,因为我可以在另一台PC上构建适当的apk。

When I run ionic build android , the android apk was successfully generated but when I install the apk, installation is not successful. 当我运行ionic build android ,成功生成了android apk,但是当我安装apk时,安装未成功。

When I run ionic build android the second time, the following error was encountered; 当我第二次运行ionic build android时,遇到以下错误;

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. 例如,使用了无法识别的jvm选项。 Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.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 object heap Error: Could not create the Java Virtual Machine. 请参考守护程序上的用户指南一章, 网址http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html。请阅读以下过程输出以了解更多信息:--------- -------------- VM初始化期间发生错误无法为对象堆保留足够的空间错误:无法创建Java虚拟机。 Error: A fatal exception has occurred. 错误:发生致命异常。 Program will exit. 程序将会退出。

  • Try: Run with --stacktrace option to get the stack trace. 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. 使用--info或--debug选项运行以获取更多日志输出。

C:\\Users\\own\\Dropbox\\Workplace\\xampp568\\htdocs\\ionicApp\\platforms\\android\\cordova\\node_modules\\q\\q.js:126 throw e; C:\\ Users \\ own \\ Dropbox \\ Workplace \\ xampp568 \\ htdocs \\ ionicApp \\ platforms \\ android \\ cordova \\ node_modules \\ q \\ q.js:126抛出e; ^ Error code 1 for command: cmd with args: /s /c "C:\\Users\\own\\Dropbox\\Workplace\\xampp568\\htdocs\\ionicApp\\platforms\\android\\gradlew cdvBuildDebug -b C:\\Users\\own\\Dropbox\\Wor kplace\\xampp568\\htdocs\\stkview\\stkApp\\platforms\\android\\build.gradle -Dorg.gradle.daemon=true" ^命令的错误代码1:带有args的cmd:/ s / c“ C:\\ Users \\ own \\ Dropbox \\ Workplace \\ xampp568 \\ htdocs \\ ionicApp \\ platforms \\ android \\ gradlew cdvBuildDebug -b C:\\ Users \\ own \\ Dropbox \\ Wor kplace \\ xampp568 \\ htdocs \\ stkview \\ stkApp \\ platforms \\ android \\ build.gradle -Dorg.gradle.daemon = true”

I was also getting the same error, then I deleted .glade file and reopened the android studio. 我也遇到了同样的错误,然后删除了.glade文件并重新打开了android studio。 It's working now. 现在正在工作。

I encountered similar error before. 我之前遇到过类似的错误。 What I did was delete platforms\\android\\.gradle and run ionic build android again. 我所做的是删除platforms\\android\\.gradle并再次运行ionic build android

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM