I have an ionic application that I try to run on the android platform. When I execute
ionic run android
Or
ionic emulate android
I have the following message:
Total time: 0.814 secs Built the following apk(s): /Volumes/DATA/apps/my_app/platforms/android/build/outputs/apk/android-debug.apk ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1 JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
The application won't launch.
Here is the result of the ionic info command:
Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
ios-deploy version: 1.7.0
ios-sim version: 3.1.1
OS: OS X Yosemite
Node Version: v4.4.5
Xcode version: Xcode 6.3 Build version 6D570
Thanks in advance.
Try remove android platform and reinstall :
ionic platform rm android
ionic platform add android
After adding the platform, just go to this path file: platforms/android/cordova/lib/device.js
Comment this uninstall function line by changing this:
.return Adb.uninstall(resolvedTarget.target, pkgName)
.then(function() {
return Adb.install(resolvedTarget.target, apk_path, {replace: true});
});
to this:
//.return Adb.uninstall(resolvedTarget.target, pkgName)
// .then(function() {
// return Adb.install(resolvedTarget.target, apk_path, {replace: true});
// });
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.