I've build my app under the version 1.6, 2.1 and 2.2 of android and it works. I'd like to know when I'll publish it what is the best :
Build under 1.6 and so it will be compatible with newer version of android
or
Build under 2.2 and set "Target SDK version" to 8 and "Min SDK Version" to 4
Thanks
If you're not using anything that is specific to 2.1 or 2.2 there is no difference. If you for example use install to SD card feature of 2.2 you have to use Target SDK and min SDK option.
Build it under 2.2 and use Min SDK Version.
Target Version is described as the following:
"With this attribute set, the application says that it is able to run on older versions (down to minSdkVersion), but was explicitly tested to work with the version specified here."
Actual statistics of the "market share" are available on the developer website:
http://developer.android.com/resources/dashboard/platform-versions.html
1.6 takes 20% at the moment.
Related
I did many searches on the web, and only partially I understood what I have to do.
When my IDE (Android Studio) reminded me that are available recent update for android SDK, I provided to install them. Now I notice that the Android-SDK directory occupies 87Gb of HDD memory.
This because are installed all the Android API from older version to the latest new.
Today I decided to delete all the SDK directory and perform a clean installaton of the SDK tool.
What I ask is which are the minimum things that I've to install from the SDK manager to be up and running for Android Development.
Consider that my apps must run from Android API 14 (4.0 IceCream) to the least available API version (currently on October 2017 is API 25).
In addiction I use an Android Emulator with Lollipop 5.1 (API 22).
The last thing I ask is when there is a new available and I would to install it, should I unistall all the older API version to prevent SDK grow up?
This is the screenshot of my Android Studio SKD manager.
As you can see the only checked API is 7.1.1 Nougat API 25.
This is a series of screenshot of package details of SDK Manager
The others are all unchecked.
I have to say that for Android 5.1 Lollipop API 22, check marks appear after I create the Android Emulator with Lollipop Installed.
NB: I need only things for mobile programming, not TV or Wearable.
should I unistall all the older API version to prevent SDK grow up?
Yes you can do this to reduce the space size taken by the SDK
Cons : you will not be able to use instant run if you are running your app on particular device on lollipop and above.
Note : you can drop old version under API 14 as support library has also dropped the support for older version
From docs, Revision 26.0.0 Release (July 2017)
The minimum SDK version has been increased to 14. As a result, many
APIs that existed only for compatibility with pre-14 API levels have
been deprecated. Clients of these APIs should migrate to their
framework equivalents as noted in the reference page for each
deprecated API.
While developing an andriod application in Eclipse IDE, the target level is set to 4.4 and I am not getting any option of lower levels of andriod. If I start building the add on higher version.. will my app is executable in lower version devices ?
check your SDK manager, do you have other API version
your app will executable in your minimum SDK setting in your app
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
if i use android 4.1.2 (API 16) Android SDK will my apps work on Android 2.3 phones. i have downloaded android 4.1.2 sdk tools and other packages.
You will need to set the minimum SDK attribute in your manifest to 2.3 to ensure you app will work on earlier versions of the OS.
Your app will work fine, assuming you are not using any API calls from a later version.
The Android Dev team suggests you always compile against the newest version you can support. So, you are on the right track.
So bottom line, you are on the right track, just make sure to test your app against a 2.3.3 version of the emulator to ensure you are not using any un-supported API calls.
No, if your minimum sdk version is 16 it wont work on that android version.
if you want it to work on that specific version then set the minimum sdk version to 9. You can change this in the apps manifest file.
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="21"
/>
If you are getting errors probably saying "This code uses the minimum sdk to be api 16 or higher"
find alternate ways to modify the code for older android phones. If that does not work then dont support old version of android maybe.
I've already asked Google support about this and they were no help ...
In my manifest I have
uses-sdk android:minSdkVersion="10"
which corresponds to version 2.3.3 however when I publish the app to the market it says that the minimum version required is 2.3.7 and uses that in the filter.
How do I tell the market to use 2.3.3 as the minimum version ??
Thanks.
2.3.7 is the latest revision of Gingerbread_MR1. I would recommend switching to SDK version 9 if supporting 2.3.3 is really that important.
I suspect your manifest filter entries (or) API used is compatible of 2.3.7 than 2.3.3 (I suspect you might upgraded to 2.3.7) which prevents using 2.3.3 even though you use min-sdk 10.
see this comment from documentation
o use APIs introduced in Android 2.3.3 in your application, you need compile the application against the Android library that is provided in the Android 2.3.3 SDK platform.
While creating an android project if i say that the Build Target of my Android porject is 2.2 (API Level is picked as 8) and in the text box for Min SDK version. If i put some value apart from the API level (smaller or greater than 8) of the build target then what happens?
Does the build happen according to the build target specified, but the application developed is compatible with the smaller android versions (if i specify API level < 8 ). Or the application developed is only compatible for the higher android version (if i specify API level > 8 ).
Can anyone please explain?
There is a similiar question already posted with an excellent answer:
Read the post by Steve H.
Android Min SDK Version vs. Target SDK Version
Say you set the manifest API level to 4, then the app will work on any api 4 device provided. BUT the project will be built to API level 8 so if you have any post-level 4 api methods in your code then the app will crash.
You can only put min SDK version less than your target version,it tell that your application can support to that min SDK version,but you should confirm that your application should run under min SDK version supported devices since the Build target versions may use new APIs which are available for that specific version and those APIs may not available in min SDK versions
ok.. if you have developed an application using particular sdk for instance Android 2.2 and your minSDKversion is < 8 then application is falsely declaring to android system that It can be installed in Android device having sdk version less than Android 2.2. In that case if application happens to install on Android 2.1 and if you re using API that are exculsiviely avaialbe in Android 2.2 platform and not on Android 2.1 then your application will crash on the device. if your minsdkversion > 8 then application won't get installed on the device having Android sdk 2.2 or lower version