简体   繁体   中英

Unable to Run/Deploy Ionic application in Genymotion

After running Genymotion virtual device, when I try to run ionic application, run command just hangs.

First of all "adb devices" returned no device listed. I used "adb connect" command to connect Geneymotion virtual device as shown below,

C:\\Users\\Asif\\myapp3>adb connect 192.168.56.101:5555 connected to 192.168.56.101:5555

"ionic build android" command works fine and generates APK file but when I run "ionic run android" command it hangs and keeps on waiting as shown below,

C:\Users\Asif\myapp3>ionic run android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Asif\myapp3\hooks\a
fter_prepare\010_add_platform_class.js C:\Users\Asif\myapp3
add to body class: platform-android
Running command: cmd "/s /c "C:\Users\Asif\myapp3\platforms\android\cordova\run.
bat""
ANDROID_HOME=G:\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_75

Sometimes it process one step further and hangs at below stage,

C:\Users\Asif\myapp3>ionic run android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Asif\myapp3\hooks\a
fter_prepare\010_add_platform_class.js C:\Users\Asif\myapp3
add to body class: platform-android
Running command: cmd "/s /c "C:\Users\Asif\myapp3\platforms\android\cordova\run.
bat""
ANDROID_HOME=G:\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_75
WARNING : No target specified, deploying to device '192.168.56.101:5555'.

Please advise. USB debugging is enabled in the virtual Device.

Here is my environment details,
Genymotion 2.6.0
Oracle VM Virtual Box manager 5.0.4
Virtual Device: Google Nexus 4 -5.1.0-API22-786X1280
Cordova CLI: 5.4.1
Ionic CLI Version: 1.7.12
Ionic App Lib Version 0.6.5
OS: Windows 7 SP1 64 bit Node Version: v4.2.1
java version "1.7.0_75" 64bit
AndroidManifest.xml entry: uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22"
SDK Tools for API22 already installed using "Android SDK manager"

Issue resolved. The issue was due to Microsoft Security Essentials real time protection. I turned it off and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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