So I’m working on my first Ionic app for Android. I’ve got it all running via CLI on my Macbook.
I was able to download the Sociogram demo app and start with that. I was able to export the APK and run it on an emulator and my phone. SO far so good…
I sent it to a friend, and he gets “unsupported file”. His Android is 4.1.2, mine is 4.4.2
I assume the reason it’s not working on his is because my environment is using API 19, which his phone doesn’t support.
I know a lot of apps in the store say they work on 2.3.3+ (Gingerbread) which is API 10, so I started to try and get it to work with API 10 and test it.
I’ve read about editing the [uses-sdk] tag here (http://developer.android.com/guide/topics/manifest/uses-sdk-element.html) in the AndroidManifest.xml, and I tried that, but the debug from the “ionic build android” still seems to reference API 19.
I then modified some of the project.properties in both /platforms/android and /platforms/android/CordovaLib but then those throw other errors, some about the “hardware:true” settings in the manifest, and another deeper in the build.xml
Am I right about the API being too high for the older phone?
What’s the correct way to change the target API? It seems to have it hard coded in when I run:
] ionic platform add android
I get the following which already has 19 built in… how do I change this? It looks to build the AndroidManifest.xml already around the fact that 19 will be the level, I’m guessing this can be changed before the BUILD command.
sh-3.2# ionic platform add android
Creating android project…
Creating Cordova project for the Android platform:
Android target: android-19
Copying template files…
Running: android update project --subprojects --path “platforms/android” --target android-19 --library "CordovaLib"
Resolved location of library project to: /Users/slikk66/Development/Applications/myApp/platforms/android/CordovaLib
Updated and renamed default.properties to project.properties