Android: What sdk do I need to install - android

If I make an app targeting sdk2.2(api8) to sdk4.4.2, do I need to install every sdk from 2.2-4.4.2? Also should I install all the Android Build Tools?
Thank you for your time.

No, in the specific case you mentioned: MinSdk 2.2 to TargetSdk 4.4.2.
You only need to download the SDK for Android 4.4.2, not 2.2. Nor do you need the SDKs in between.
But yes, you do need to download the latest Android Build Tools and keep those up-to-date.

Related

How SDK platforms work in android studio?

I am confused about how SDK platforms work in android studio.
I have only a few SDK platforms installed, yet i am able to run my app for MeMu android 4.4.4 emulator.
When creating the project i set min version to android 4, i assume that's why it can run on android 4+. but then what are these SDK platforms and what will be missed if i dont have them installed?
Those are different versions of the SDK released for the different versions of the platform. Generally you just install the latest and use that for a new project. However not all projects jump right on updating it, so if you're working on a pre-existing app you may need to download whatever version they were using at the time.

Android minimum app sdk, required sdks for compilation and compatibility issues

I'm new to android and i want make some things clear about some confusions:
If i set my new android application to a minimum sdk version to 4.0.3 (api 15) should i install all sdks between that version and the latest one ? Or should i just install the sdk level same the device/emulator i will use for testing has as plateform version?
What about when i will generate the final apk for the appstore which will be supposed to work in all android platform versions starting from the min sdk i've targeted ?
i was reading about the Android Support Library and i guess it should be always part of the latest sdk. if i use it on my application should i still have earlier sdk versions installed for the compilation ? Won't i never need anymore packages from earlier API version once i use the support library ?
Best regards.
You do not need the SDK for the minimum version. You only need to work with the SDK of the Target/Maximum version.
Download the platform tools and platform through the SDK manager for the Target API version. And if you use features that are not available in the minimum version, use Android Support Libraries.
The purpose of setting your Minimum SDK is to let devices know if they'll be able to run the code based on what SDK they're using. You don't need to have all versions of the SDK, just the most recent one that you're developing for. If you're using Android Development Studio, it will warn you if a feature you're trying to implement is not supported by the Minimum SDK you've set for the project.

Android : Cannot install earlier packages

I have successfully installed Level 13 (3.2) during the Android SDK installation, but chose not to include any earlier levels at that time.
I now would like to install 2.2 or 2.3, but in the SDK / AVD manager I get the message:-
Failed to fetch URL
https://dl-ssl.google.com/android/repository/addons_list.xml, reason:
File not found
I've looked this up in other posts and so run the SDK manager with Administrator permissions, and have turned off the firewall. Eventually, it comes back with SDK tools revision 15, and SDK PLatform tools revision 9 only.
Should I have installed earlier packages during setup?
Would an uninstall / reinstall cure this behaviour? (Reluctant to do
this :-( for obvious reasons)
Is it possible to get earlier levels having installed just level 13?
Any help would be greatly appreciated. Thanks for looking.
Old Android SDK tool (r13 and earlier) fetch/download available SDK from here repository, after google release r14 and r15, they remove all SDK verion and only leave r15 in this URL, that means they want you use the latest SDK tool r15.
New Andorid SDK tool (r14 and r15) fetch/download available SDK from a new URL repository-5, which contains everything downloadable.
If you are not using anything else like Maven (currently incompatible with latest ADT) with your project, the simplest answer is upgrade both your Android SDK tools and ADT Eclipse plugin.
I just setted up my android environment yesterday - try to download the package manually and load them as Archive files, this worked for me! ;)

is it necessary to keep older versions of Android SDK installed with Android SDK Manager?

In the Android DSK Manager under "Installed Packages", I see things like:
SDK Platform Android 3.2
SDK Platform Android 3.1
SDK Platform Android 3.0
SDK Platform Android 2.3
SDK Platform Android 2.2
SDK Platform Android 2.1
SDK Platform Android 1.6
SDK Platform Android 1.5
Is it necessary to keep the older SDKs, if I am programming with the latest SDK?
No. You dont need older packages if you are sure about developing with latest packages.
You dont need to keep those packages which your application is not using. Generally you should keep those versions installed which your application is going to use. Like your application may use version from 8 to 10. So no need to keep lower than 8. So that depends on your application which version it will use.
Its too late but I would like to share my experience.
Yes, if you are using Instant Run and using SDK 21 or higher then you should keep SDK Platforms.
For Example, if have deleted the SDK Platform 22 and testing on Android 5.1 device or emulator then Android Studio will ask you to install SDK Platform if you want to use instant run else instant run will not work.

Target option is disabled in Eclipse window->Preference->android

Why my target option in eclipse is disabled? I cant select the target platform.
On the other hand the platform folder and adds-on are empty.
Plz any ideas?
After you have installed your SDK, you need to download all the platforms you need (like Android 1.5, Google API's, so on...)
Then you should create some virtual devices with some parameters (like screen size, sd card...). Then you should run the app over the platform you like.
I guess you need to install required platforms.
Eclipse > Window > Android SDK and AVD Manager > Available Packages ....
Encountered the same problem. The Android SDK archive does not come populated with a specific Android platform or Google add-on. We can use the SDK Manager to install or update SDK components such as platforms,tools, add-ons, and documentation. I used the eclipse tooling option path provided by the first answer. There is also a "SDK Manager.exe" file that can be used to download outside eclipse.
You need to install the complete API that you're working on.
Suppose, In my case I am working on Android 5.0 SDK Tools and I Froyo 2.2 for minimum SDK Verison support. So Now I have 2 SDK Tools Installed, Android 5.0 and Android 2.2.
To make them support as Target SDK, I need to install the complete package from Android SDK Manager.
In your case install the complete package of the respective API you're using. After installing, restart eclipse and then your Target Option will be enabled.

Categories

Resources