Chirag thaker Chirag thaker - 1 year ago 186
Android Question

ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: not installing on Android api level 23

I am currently working on developing hybrid app using ionic.
At this moment everything works fine as expected when i try to run it in browser using ionic run and grunt serve.

But when i try to install app on mobile it gives me error like error installing on mobile
Now this seems like issue of minSdkVersion and targetSdkVersion.
Although i am sharing my config.xml so you can get clear idea.

I am having big trouble solving this problem. If you guys can point me in the right direction, that would be great help.

NOTE: please ask me if you need any extra information about anything.

SDK information SDK platform of api 21,23

Answer Source

in config.xml i have inserted two line that was wrong.

<preference name="android-minSdkVersion" value="19"/> and <preference name="android-targetSdkVersion" value="23"/>

that was wrong, i created new ionic sample project and in that project opened config.xml and i saw that there was only one line that was

<preference name="android-minSdkVersion" value="16"/>

so i copied that and put in my config.xml file then i removed android platform and added android platform again.

then i try to run in massmalow,lollipop and all other device. that works like charm.

Thanks for your support.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download