简体   繁体   中英

ionic run android is not working

I want to run android application in my device,I tried commands ionic build android and ionic run android .But no error message is showing.

在此处输入图片说明

system ionic configuration is,

在此处输入图片说明

Please help me?Thanks in advance

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM