Build Target and Min SDK version in Android - android

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

Related

How to get multiple target android level in eclipse IDE?

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

Target build and SDK

I am getting into Android app development now, what build should I choose as the target SDK and will my app work on higher APIs? Also, is there no API 20 build for KitKat, I only see one for KitKat Wear.
I believe you should set the API to what users have most, based on the latest numbers https://developer.android.com/about/dashboards/index.html?utm_source=ausdroid.net I believe you should set at least API 15 or better 16.
minimum required SDK = lowest version of the android that your app will support(make 10 if you want to target most of the devices, else make 14 or above if you don't want to use support library, good for beginning)
target SDK = you should choose it as latest stable version(choose 19 if you don't want support for android wear also)
compile sdk = 19
API 20 is specifically for applications designed for android wearables.
https://developer.android.com/training/wearables/apps/creating.html#SetupDevice

Android 2.1 (API level 7) and AdMob Sdk 6.3.1

Im trying to compile an andriod app API level 7 with Admob Sdk 6.3.1 but Im get an error related to
"android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize">"
I googled it and learnt that I've to compile against Android 3.2 and set SDK Min to 13. But that way my app will not be compatible with Android 2.1, am I correct? Is there any workaround? Am I missing something?
No, you can compile against a higher level, but still support lower SDK levels. Per the Admob Documentation:
The Google AdMob Ads SDK for Android requires a run-time of Android 1.5 or later (set android:minSdkVersion to at least 3 in your AndroidManifest.xml). This means you can develop with the latest version of the Android SDK and your app will still run on an earlier Android version (1.5 minimum).

What is minSdkVersion for Amazon Android in-app purchase SDK?

Some Amazon docs hint that it is 10, but examples run with 8. So what is the correct/safe/practical answer?
It is the minimum SDK requirement for application, App Developers put this variable to not install this app earlier version of device than min SDK version, it is just a safe check, to not install the app on incompatible devices
According to wikipedia http://en.wikipedia.org/wiki/Kindle_Fire the first Kindle Fire was based on Android 2.3.4 which is based on Android SDK version 10. Therefore there is no benefit to use minSdkVersion lower than 10.
If you use minSdkVersion lower than 10 your app will run on all Kindle Fires because new Android versions can run apps written for older Android versions.
However if you specify min SDK version 10 you can use all APIs that is available in the SDK version 10 but is not available in the Android SDK version 8.

Should a legacy Android application be rebuilt using SDK 2.1?

I have an Android application that uses the well known Strategies for Legacy Applications. It is build with the Android SDK 2.0 with manifest settings minSdkVersion="3" (API 1.5) and targetSdkVersion="5" (2.0). Question1: Since maxSdkVersion is not specified, the application should be installable and compatable with newly released Android versions 2.01 and 2.1 correct? At this point in time, I am not planning any enhancements that will use any new API features. Question2: is there any value in rebuilding the application with Android SDK 2.1? Question3: If so, should targetSdkVersion be changed from 5 (API 2.0) to 7 (API 2.1)?
Question1: Since maxSdkVersion is not
specified, the application should be
installable and compatable with newly
released Android versions 2.01 and 2.1
correct?
correct.
Question2: is there any value in
rebuilding the application with
Android SDK 2.1?
not really, if you're not planning on using anything new.
Question3: If so, should
targetSdkVersion be changed from 5
(API 2.0) to 7 (API 2.1)?
in general, targetSdkVersion should be the newest version you've tested your application on:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#target

Categories

Resources