I am starting to learn android development. I downloaded adt-bundle-windows-x86 from the android site. Now when I open the SDK manager that comes with the bundle it enlists a number of API levels. My phone has ICS. But when I saw wiki for the same it seems we can have more than one API levels for a single code name.
Which one is to be used? I want backward compatibility and also not miss on the new features that might have been introduced in ICS. what do these API levels mean and how do I decide which one to use?
Here is a link to the list of Platform Version - API Level - VERSION_CODE - Notes
This link shows data about the relative number of devices running a given version of the Android platform.
I recommend:
minimum sdk version = Android 2.3.3 - Gingerbread - Api level 10
target sdk version = Android 4.3 - JellyBean - Api level 18
NOTE the target sdk version most of the time should be the latest release which at current is JellyBean
Here you can find a list of api levels, code names and usage statistics.-
http://developer.android.com/about/dashboards/index.html
You should try making your application compatible with as much devices as possible, so I'd recommend to make sure that works fine at least on Android 2.3.3 - Gingearbread - Api level 10
Regarding new features, sadly, keeping in mind old devices sometimes means forgetting about some new cool features or apis which are included to make our lives much easier.
I think this can help you a lotclick
You should set api level as minimum as possible like 2.3.3 gingerbread. 35% of android devices still runs on Gingerbread. But as per your question it seems like you wanted to start development from 4.0.4 ICS. So set your min SDK 14. And as far as new graphical or library changes google provides support library for use.
One suggestion set max api level as high as possible. I mean 4.3 for now. hope this would help
Related
My app needs Renderscript since it performs some image processing that would take several seconds in Java. Before publishing I have tested it on a number of devices, even some older models (e.g. Samsung Galaxy Tab 2, API 17), and the app worked quite well, even on these devices. From this, I didn't see a reason to set the minimum API higher than 17. Now, some weeks after publishing on Google Play I see that the app crashes on certain devices such as Galaxy S3 (m0) with API 17 or Galaxy S3 Mini Value Edition (goldenvess3g) with API 18.
android.support.v8.renderscript.s: Error loading RS jni library: java.lang.UnsatisfiedLinkError: unknown failure
As such that is not surprising, since I knew about certain processor types that do not support Renderscript or other device specific issues that can cause problems. Questions:
Is there a (approximative) way to find out, which of the 6'811 Android devices with API >= 17 do NOT support Renderscript? For example based on the terms in brackets (m0, goldenvess3g) which are possibly related to processor types? If so, I could exclude these devices on Google Play.
If there is no such possibility, would you recommend to set minimum API higher, e.g. API 19? Sounds naive, but I didn't find consistent info on this.
Thanks a lot for your feedback.
According to android.renderscript documentation, it is available since API level 11. Since your min API level is 17, I would recommend to use it instead of android.support.v8.renderscript.
Support library APIs are meant to be used if one is targeting devices running lower versions of Android, which, apparently, is not the case for you.
I am new to Android development and had a question on what should be the minimum Android version to pick for an app (phones only, not tablet) that is intended for the USA market.
I have been looking at this (https://developer.android.com/about/dashboards/index.html) and thinking may be API 10(Gingerbread) is the way to go. However some folks have suggested that I can safely pick API 15(Ice Cream Sandwich) and I should be fine.
What are other app developers doing?
Android Studio has it defaulted to ICS (API 15), which will get you 100% of tablets.
This table shows that API 15 would get you 85.8% of all Android Devices currently being used.
The problem is that some of the APIs use methods that are preferred over the older APIs and you will run into a lot of times where you need to handle one way for an older API level, and a second way for a newer API. So you have a lot of potential for if < API 16 do x, else do y.
So you need to weigh the maintenance cost vs what percent of the market you want to capture. Personally, I chose API 16 because the 11% of tablets created more work to maintain API 15 then benefit of having that user base.
When I created my application, I chose 1.0 for the minimum SDK and 4.3 for the target SDK, so my application works on all phones.
But why would we choose (for example) a minimum SDK of 2.2?
Is it about performance, or something like that?
First of all i'd like to clear,
android:minSdkVersion="integer"
Despite its name, this element is used to specify the API Level, not the version number of the SDK (software development kit) or Android platform. The API Level is always a single integer. You cannot derive the API Level from its associated Android version number (for example, it is not the same as the major version or the sum of the major and minor versions).
find more detail
we choose minimum and maximum version for our app because , some of the feature which are not supported in lower/higher versions of android are used in app . The Android system will prevent the user from installing the application if the system's API Level is lower/higher than the value specified in this attribute.Hence preventing unwanted force close.
Most of the features of higher versions of android will not work in api level 1 .thwn why will you put level 1 as minimum sdk.
Android is a system that is everytime changing, and that implements new features in each new version.
When you develop an app, you will have to deal with :
Compliance for the user
Nice features for your application
For example, animations of clickable elements are not well implemented in Android 2.3. So when you will have to develop an application, you will have to choose :
Compliance with a maximum users including 2.3 compliance
Develop a lot of nice animations, including on clickable elements
It's why sometimes you decide to develop an applications, you may decide to not include some versions of the SDK.
And for having a clear view on how much users you would loose, you may want to go to :
Dashboards
99,9% of phones use SDK 2.2 and later and all cool features that you can use are avaliable on later SDK versions than 1.1. That is the main reason, but you can use earlier version of SDK for minimum but in has no efect because you are covering all devices with 2.2 SDK.
I am using a textbook which uses android V2.0. Can you tell me which version of android can run apps for version 2.0 without any problems ?
If you are going for just running the app, then any device with API level 5 (Android 2.0) and up (that includes Jelly Bean and any future versions) will be able to run your app without any problems. The developer docs have an API level guide here.
However, you should familiarize yourself with subsequent versions of Android so that you can make an informed decision on what version you should use, and what features you will be unable to use.
For example, you can see on the Supporting Multiple Screen Sizes page that Android 3.2 (API level 13) introduced new features for supporting multiple screen sizes. If you use API level 5, your application may not scale correctly on some devices (namely tablets).
Though it is tempting to try to support as many devices as possible, there is a definite trade off involved with using a lower API level. For some apps, it doesn't really matter if it scales correctly, but it is something that you need to take into consideration when choosing a target or minimum API level.
Please i have different platforms installed. I just wanted to know what am supposed to do. If i develop with 3.0 platform, would those with a 2.2 be able to use my app??..
The second question which is the main question is I always get this error when i create android projects..
[2011-05-16 16:32:21 - Hello World] Dx no classfiles specified
[2011-05-16 16:32:21 - Hello World] Conversion to Dalvik format failed with error 1
What do I do to it?
There are several reports out there for that error (e.g., this one. All the solutions point simply to reload the project (select it in the tree at your left, and press F5).
Regarding the first question, unless you want to support Honeycomb-only features, then set up the api level to 8 (Froyo).
Eclair, Froyo and Gingerbread are android versions 2.1, 2.2 and 2.3 respectively (also referred in the documentation as API levels 7, 8 and 9). See the table here. If you want to support just mobile phones, set your target to 2.1 or even lower. That way you will be able to target most of the phones in the market. Your app will also run in Honeycomb (3.x) devices.
Honeycomb has new features to support larger screen devices, so if that is your main target, you might consider taking advantage of those features and drop cell phone support. All will depend on what is your objective.
you should have a look at the minSdk and targetSdk features of a manifest file :
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8" />
This will help you target a android sdk version and precise what is the minimum sdk level that can run your app.
Regards,
Steff
Developing for Honeycomb or non-tablet version of Android, is different in various things. Your 2.2 application should run correctly on a tablet, but if you want to optimize the graphical interface and use all the notification and other things included only in Honeycomb, then you must use the appropriate API. Until Ice Cream Sandwich is released, we have to develope two different application for the best result.
Regarding the error you get with android projects (I suppose under eclipse?) you'll find some detail at this link, but if you follow all the instruction provided by google in the developers page, you'll be able to write and run your Hello World application.