I have an Ionic app that I'm trying to get to work in a Genymotion Virtual Device. Here's what's in my command prompt after I input the command "ionic run android"
Updated the hooks directory to have execute permissions
Running command: "c:\Program Files (x86)\nodejs\node.exe" c:\Users\username\git\mobile\hooks\after_prepare\010_add_platform_class.js c:/Users/username/git/mobile
add to body class: platform-android
Running command: c:\Users\username\git\mobile\platforms\android\cordova\run.bat
ANDROID_HOME=c:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files (x86)\java\jdk1.8.0_45
WARNING: No target specified, deploying to device '192.168.56.101:5555'.
Running: c:\Users\username\git\mobile\platforms\android\gradlew cdvBuildDebug -b c:\Users\username\git\mobile\platforms\android\build.gradle -PcdvBuildArch=x86 -Dorg.gradle.daemon=true
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJava UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:packageDebugJar UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:packageDebugJniLibs UP-TO-DATE
:CordovaLib:packageDebugLocalJar UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:compileDebugJava UP-TO-DATE
:preDexDebug UP-TO-DATE
:dexDebug UP-TO-DATE
:processDebugJavaRes UP-TO-DATE
:validateDebugSigning
:packageDebug UP-TO-DATE
:zipalignDebug UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug UP-TO-DATE
BUILD SUCCESSFUL
Total time: 27.114 secs
Built the following apk(s):
c:\Users\username\git\mobile\platforms\android\build\outputs\apk\android-debug.apk
Using apk: c:\Users\username\git\mobile\platforms\android\build\outputs\apk\android-debug.apk
Installing app on device...
Launching application...
LAUNCH SUCCESS
I should also mention that after the commands finish, there IS a small change on my device. A small menu pops up, with three options, "Wallpaper", "Manage apps", and "System settings". However, the app does not launch, nor does it appear in the list of installed apps.
To run your app, all you have to do is enable USB debugging and Developer Mode on your Android device, then run ionic cordova run android --device from the command line. Enabling USB debugging and Developer Mode can vary between devices, but is easy to look up with a Google search.
Fixed it on my own: turns out, the type of virtual device was the problem. I had been using a Google Galaxy Nexus 4.1.1 API 16 device, switching to Google Nexus 4 5.1.0 API 22 fixed it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With