I began the process of making one of my apps Honeycomb-friendly.
I started by changing the project's target build to version 11, and edited to AndroidManifest.xml to use:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="11" />
These are the only changes I made so far. I am able to test it perfectly on my Honeycomb tablet device.
However, I cannot get Eclipse to launch this app in an older emulator (e.g. version 9). Technically speaking, the app should run in older android versions, so what can I do to test this app for older devices?
Or am I doing something else wrong?
I'm by no means an expert on this front but setting the minSdkVersion different from the targetSdkVersion doesn't make the app automatically use a different API level based on the device. See this:
Android Min SDK Version vs. Target SDK Version
and this:
http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html
I suspect that because your application is using level 11 apis it won't run on a device that is of a previous API level.
This seems to be some sort of bug. When my 3.1 device is plugged into my PC, Eclipse/Android won't let me launch a new emulator that's < 3.0.
I worked around this by launching the emulator before I plug in my device, and then it has no problems deploying the app to both of the running devices.
Related
Up until now I have been doing my Cordova development on a Nexus 5 and Galaxy S4 which are running Android 4.4.2 and 4.2.2 respectively.
I recently tried development on a device running 4.0.4 and it wouldn't install. I found out this was due to my manifest which had:
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="19" />
I quite easily changed the minSdkVersion to one that suited that of Android 4.0.4 (15) and it compiled.
I was just wondering though, does anyone know if there are any functions used within Cordova or PhoneGap which would require an elevated minSdkVersion?
Is it only dictated by any plugins or native code that is written?
Phonegap requires at least Android 2.2. Taken from the documentation: "Cordova supports Android 2.2, 2.3, and 4.x." As long as you are above version 7 you are fine. If you're using an HTML5 framework like e.g sencha you should check their restrictions, too. It makes sense to support the minSDK 10 as there are still many devices (about 20%) of Android users which are running on Gingerbread as you can see in Googles fragmentation chart.
To answer your second question: of course it would be possible that a plugin features functionality which is only available on newer devices. In that case you have to make the decision if you rather go up with your minSDK by locking out users, or you do it without the functionality. It all depends on how well your plugin is written - normally it should also work on devices which don't feature the higher level APIs and react properly (e.g "sorry, your device is too old for that feature get a new one" ;)
Hope that helps!
I'm new to Android development. I know this question is asked before. I've developed an Android application, tested it on OS Ver > 4.0.4 android phones. It worked fine. My SDK settings in the manifest file are below.
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
Doing so, will it limit the audience for the application? I see that I cannot allow the users who has V < 3.0 because of the ActionBar. But, does the SDK versions have any compatibility issues? I'd like to keep a wider Audience to this app, but do not have bandwidth to test on all versions. Thanks.
I'm releasing app next month. What are the issues that I have to take care of when releasing in context of the app compatibility in the Android developer console?
Thanks.
A minSdkVersion value of 9 indicates that the app will be available for devices running Android 2.3 (Gingerbread). If you want to restrict it to devices running 3.0 and above, you have to have a minSdkVersion of 11.
If ActionBar is the only contentious issue preventing you from distributing to devices running Android version <3.0, you can use the Support Library to make it available for Android versions 2.1 and above.
I'd like to keep a wider Audience to this app, but do not have bandwidth to test on all versions.
I do not understand what you mean by "bandwidth", but if you really want to test it on all versions, you can create emulators for each of these version and test it.
While creating a project using eclipse i have Minimum SDK required as Android 2.2(Froyo) and Target SDK as Android 4.2(Jelly Bean) compile with Android 4.3. I have used sqlitebrowser v2.ob1 for creating database. My app runs without any errors (few lines in red in logcat though) and meets my requirements when i run it in an emulator. I tried 3 different emulators and it works fine. But when i tried this app in a mobile device it shows force close whenever there is something to do with database. I mean to say that it shows force close when it has to retrieve from database or connect to database. By searching i learned that just the .apk file is enough for the app to run even if externally created database is used in it (copying to assets folder and then to the default location). My questions are
Shouldn't my app work fine in any device ranging from Android 2.2 to 4.2 ?
Should i try compiling the app with Android 4.2 instead?
Am not sure about the version of the device i tried it in but am sure its within 2.2 and 4.2 . (Probably gingerbread). Other than plugging the device to PC via USB and seeing logcat (bcoz i dont own an android mobile phone) what can i do to solve this?
How is the app's version, emulator and version of mobile or any other device related?
My app can run on what versions of devices?
This is my first android app so any help is appreciated. Thanks in advace
It's possible that you are using a feature in your application that isn't supported by a lower version of the SDK. It's difficult to tell you exactly what that might be without any source code or stacktrace, but I can clear up your understanding of minSdkVersion and targetSdkVersion.
Consider that with each new version of the Android SDK, additional features and APIs are introduced that did not exist in previous versions. Obviously, the older versions of Android don't support those features.
When you specify a targetSdkVersion you are specifying that you are using features that were introduced in that particular version of Android. You are also implying that you have tested your application at that particular API level, and that it works as it should.
When you specify a minSdkVersion that is lower than your targetSdkVersion, you are implying that your application will work properly on a lower API level because you have manually programmed tests or checks in your code to ensure that the current API level is compatible with a feature before running it.
For example, if I wanted to run a feature introduced in Jelly Bean but I want to retain support for a lower API level (e.g. Gingerbread), I might add the following check before I run the feature (see other version codes here):
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
// run some code specific to API level 16
}
The Android SDK can automatically deal with code introduced in a lower API level, but it can't automatically deal with code specific to a higher API level.
So with that in mind, to answer your questions:
No, it's only guaranteed that your application will work properly on Android 4.2. It's up to you to ensure that it remains backwards compatible for earlier versions that you wish to support.
It shouldn't matter. Instead, you should first determine if your application runs on a device/emulator that is running the same API level as you are targeting (Android 4.2, API level 17), then run it on a device/emulator running a lower version and try to isolate the code that is causing it to crash (logcat will be helpful).
You can check the Android version of a device by going into Settings > About phone > Android version. If it is running Gingerbread, keep in mind that a lot of new features have been introduced since then and your application might be using some of those features. For the emulator, you can specify an API level when you create an emulator (you can download other versions to use from the SDK Manager).
I think my answer so far has made this relationship clear.
To reiterate, your application WILL run on any device running Android 2.2 or later, but it can crash if you are using features from a higher API level than the device is running.
If this is still not clear, you should read more about supporting multiple platform versions in the Android documentation: here.
I've been writing my first android app and so far have just been building against the highest android SDK available - 4.1. Up until this point I have only been testing on a physical device running 4.03 and everything seems to work fine.
I would like my min SDK level to be level 8 (2.2) and as far as I know I have not used anything from the APIs higher than this.
However if I build against 4.1 and run on a 2.2 emulator it just shows a white screen and no crash (OpenGL based so something going wrong with this). The same build runs fine on a 4.1 emu and my 4.03 device.
If I build against 2.2 with the exact same code it runs on the 2.2 emu fine.
I don't really know what could be causing this so any tips would be great. Do some classes get replaced in the newer APIs? If they were removed entirely I would assume it just wouldn't build at all against the new version.
Should I be setting my build target equal to my minimum? I am not using anything from the APIs higher than 2.2 currently but I was under the impression I should be building against the newest SDK available. Are there any negative effects of building for the lowest version for instance does it affect the look of the menus/dialogs?
Any help is appreciated, thanks.
You should build against the lowest SDK version you intend to be supported by your app (e.g., if you want to support users don't having the newest smart phones or tablets, building against the newest SDK version wouldn't be a good idea).
Generally, newer SDK versions only include additional classes and functions, but I am not 100% sure about any removed classes.
add this to your AndroidManifest.xml
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="15" />
I am working on application which should go into android 2.2(Froyo) and android 2.3(GingerBread) devices.
I have built application with android 2.3 SDK , and Installed the same application in 2.2(Froyo) and 2.3 (Ginger Bread) devices.
In both the devices application installed successfully and it is working properly.
I want to know if we install the higher version build into lower version devices is there any chances to face problems.
Till now I didn't found any issue with this.
I didn't used the MIN:SDK version field in the Manifest file.
If you want only users from version 2.2 and up to download your app, just make sure your minimum SDK version is 2.2 by putting this line in your AndroidManifest.xml:
<uses-sdk android:minSdkVersion="8" />
If you want an upper bound limit as well, you can add:
android:maxSdkVersion="10"
So users with Android SDK version 2.2 up to 2.3.3 will be able to install your app.
Regarding problems: If you're using a specific SDK API then just make sure to add an if clause around it to make sure you're on the right version. The best thing to do is change the target to 2.2 just to see if you have any compilation errors... Then you'd know what to change.
Then just fix the problems, change back to 2.3 and build.
If you don't specify the minimum sdk attribute in the manifest file users with 2.2 won't see your application on the market. It specifies that your application supports 2.2 so that users can see the app on the market.
Make sure any functionality that you use from 2.3 has an alternative functionality so that 2.2 users have the ability to actually use your application.
yes , u can find problem ,
try to install that app on android 1.6
it's about API version , there will be some APIs in your app doesn't supported in a lower API version