2
I have an HTML application and I can’t get it to run on android in test mode. I’m using Mac OS, but when using Linux everything worked perfectly with the "Cordova run android" command: the app was installed on the device and opened automatically. Now everything is happening ok, but the app does not install on the device much less wheel. It even turns on the display but nothing from there.
Some useful information.
- Java JDK installed correctly.
- All android API’s since the 17.
- Latest stable android platform in application directory.
- Connected device and active debugging mode.
Nothing wrong apparently, look:
Rodolfos-MacBook-Pro:cordbuild2 rodolpho_paranhos$ sudo cordova run android
Running command: "/Users/rodolpho_paranhos/Library/Mobile Documents/com~apple~CloudDocs/Projetos/Pray/cordbuild2/platforms/android/cordova/run"
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.1.2
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
WARNING : No target specified, deploying to device 'LGOTMS5a4ccfc'.
Running: /Users/rodolpho_paranhos/Library/Mobile Documents/com~apple~CloudDocs/Projetos/Pray/cordbuild2/platforms/android/gradlew cdvBuildDebug -b /Users/rodolpho_paranhos/Library/Mobile Documents/com~apple~CloudDocs/Projetos/Pray/cordbuild2/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: 3.264 secs
Built the following apk(s):
/Users/rodolpho_paranhos/Library/Mobile Documents/com~apple~CloudDocs/Projetos/Pray/cordbuild2/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /Users/rodolpho_paranhos/Library/Mobile Documents/com~apple~CloudDocs/Projetos/Pray/cordbuild2/platforms/android/build/outputs/apk/android-debug.apk
Installing app on device...
Launching application...
LAUNCH SUCCESS
Rodolfos-MacBook-Pro:cordbuild2 rodolpho_paranhos$
But does he even install the App on his device? He has tried removing the App manually and trying to run the command again. Another thing you can try is to generate the APK and manually install it. I always have problems with projects when I change development environment. I almost always recreate the project and add the source code I created.
– Pedro Henrique
@Pedrohenrique I’ve done everything. It only installs by adb, so it is difficult to build later install. I bought another smartphone and worked smoothly. The problem was on the same device
– ropbla9