Issue
I'm using intellij idea 14 with plugin for PhoneGap/Cordova to run ionic framework projects.
The thing is the project works okay on my android tablet, not in my android smartphone, works okay on default android SDK emulator, but not with genymotion emulators. When I try to build I always get success message with no errors, as you can see:
"D:\IntelliJ IDEA 14.0\bin\runnerw.exe" C:\Users\Mateo\AppData\Roaming\npm\ionic.cmd run --emulator --target=479009ad544bb0a4 android
Running command: "C:\Program Files\nodejs\node.exe" D:\Drive\Cordova-Angular\todoApp\hooks\after_prepare\010_add_platform_class.js D:\Drive\Cordova-Angular\todoApp
add to body class: platform-android
Running command: cmd "/s /c "D:\Drive\Cordova-Angular\todoApp\platforms\android\cordova\run.bat --emulator --target=479009ad544bb0a4""
ANDROID_HOME=D:\AndroidSDK
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80
Running: D:\Drive\Cordova-Angular\todoApp\platforms\android\gradlew cdvBuildDebug -b D:\Drive\Cordova-Angular\todoApp\platforms\android\build.gradle -PcdvBuildArch=arm -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: 2.356 secs
Built the following apk(s):
D:\Drive\Cordova-Angular\todoApp\platforms\android\build\outputs\apk\android-debug.apk
Using apk: D:\Drive\Cordova-Angular\todoApp\platforms\android\build\outputs\apk\android-debug.apk
Installing app on device...
Launching application...
LAUNCH SUCCESS
In the devices that it doesn't run It always opens the settings buttons menu:
- Wallpaper
- Manage Apps
- System settings
I know that I must try **Edit configurations -> Command: Run -> Platform: Android -> Specify Target: ####### number of actual device " ** just like this:
I greatly appreciate any help since this bug without no errors is making me crazy and haven't found any solution online.
Solution
Well I have figured out that the best is to use the IDE in this case intellij as just a text editor. And run everything else from the command line terminal window:
So for example If I want to run on certain android device just plug it in with usb cable and then:
[cordova|ionic] run android
and it works.
Also for quick edits better use browser with:
ionic serve
Which does lives update to the app in the browser very useful.
Update
Better use webstorm it is also from the same guys from intellij (Jetbrrains) but more suitable to work with javascript and angular which is what ionic uses
Answered By - CommonSenseCode
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.