簡體   English   中英

如何在IONIC 3物理設備上運行我的應用

[英]How to run my app on an IONIC 3 physical device

我想在物理設備HUAWEI K2-L23上運行我的應用程序,但沒有得到結果...

1.-我添加平台

ionic cordova platform add android

2.-我為以前的平台構建應用程序

ionic cordova build android

3.-我在物理設備上運行該應用程序

ionic cordova run android

做三步,我得到以下錯誤:

> cordova run android
Android Studio project detected
ANDROID_HOME=C:\Users\crisa\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

安慰

我正在將Visual Studio Code與Ionic 3配合使用,已經安裝了Cordova及其所有依賴項,還添加了_JAVA_OPTIONS作為值為-Xmx512M的系統變量,我是使用SQLite的新手,這就是為什么我想要在物理設備上顯示我的應用,對我有幫助嗎?

請嘗試以下步驟:

  1. 關閉Visual Studio Code
  2. 重新啟動電腦
  3. Visual Studio Code打開您的項目
  4. 再試一次

如果上述方法不起作用,請查看SO上的這篇文章,然后嘗試哪一種對您有用。

只需刪除文件夾“ Platforms”並運行“ ionic cordova run android” 在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM