after this command
ionic build android
you got the following output after successfull build.---
Built the following apk(s):
/**/***/***/platforms/android/build/outputs/apk/android-debug.apk
then run command for install your application in device
adb install platforms/android/build/outputs/apk/android-debug.apk
if you want to test on browser then simply run
ionic serve
通过将Nodejs v5.0.0
更改为v4.2.0
解决了我的问题。
Update your Node and NPM package using command
npm update -g : (g for all global packages)
then run the command -
ionic platform add android : It will add the platform
Finally hit the command -
ionic cordova build android
Note : cordova package must be installed
first run this command - cordova platform add android
a. cordova platform remove android (for removing the platform when required)
cordova platform add ios
a. cordova platform remove ios (for removing the platform when required)
i. After adding platform, add the below in build.gradle at the end of the file. configurations
{
all*.exclude group: 'com.android.support', module: 'supportv4'
}
cordova build android
cordova build ios
cordova run android
cordova run ios
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.