If i have two or more version of android sdk build tools as shown below then when which one will be chosen by the eclipse while building. IS it anything to with the SDK platform chosen for developing apk.
Here which one will be used either 17 or 19?
The build tools specifies the toolchain used to build Android projects. In Eclipse you can change which version is used with the project.properties file by specifying sdk.buildtools, e.g.
sdk.buildtools=17.0.0
You will probably never need to do that, as it will use the most recent installed version by default. It is not tightly coupled to the SDK version, and has only been recently split apart from the SDK itself (since version 17).
If there are different versions for Android SDK Build Tools , By default eclipse uses the most recent version of the Android Build Tools.
But if your project requirement belongs to different version(may be older) , you can do this using following steps.
In the root folder of your application project, find the project.properties file.
Open the file and specify the Build Tools version by adding a build-tools property on a separate line:
e.g. sdk.buildtools =17.0.0
Related
I need to know, Do we need to install every Android SDK Build Tool, or only the latest one will be sufficient?.
See this image for reference,
Quote from official android website:
Build Tools is a component of the Android SDK required for building
Android application code. The latest version of these tools is
included in the SDK starter package and installed in the
/build-tools/ directory.
You should always keep your Build Tools component updated by
downloading the latest version using the Android SDK Manager. By
default, the Android SDK uses the most recent downloaded version of
the Build Tools. If your projects depend on older versions of the
Build Tools, the SDK Manager allows you to download and maintain
separate versions of the tools for use with those projects.
To make it short,if your project is using an OLDER version of apis (like 2.2 etc), it might make sense to use the build tools that were supplied to it.
See this to know more about the build tools.
But, having said that, there is NO NEED TO INSTALL OLDER VERSIONS of the build tools. You should always use the latest
Android SDK build tools are used to debug, build, run and test an Android application,so the latest update will always have the most refined of features.
But of course, this is only for the final android app. If you want to use the version specific features of the build tools, you will need to download the respective build-tools.
Quoting The comment below for easier readability :
It's more if you created custom build scripts (Ant, Gradle, etc.) that
assumed certain command-line switches for the build tools (dx, aapt,
etc.), you can stick with a particular version of those build tools.
Otherwise, developers tend to move to the most recent version of those
tools, for better performance, bug fixes, and the like
If you are not using any 3rd party libraries or support libraries then no you dont need to install everything but some libraries (google play services and the support library for example) require you to install other SDK's
Long story short, it is recommended you install the latest version of the SDK Build tools. The older versions are left there for backward compatibility, that is if your projects depend on older versions of the Build Tools. I've resolved many errors in my projects by just referencing older versions of the build tools.But most importantly, you are better off with the latest version.
I have an app running on android 2.1 and I would like to update it to android 3.2 as I do not have anyone using that version. How do I go about doing that? I changed the min sdk in manifest but I was wondering about the JAR file. Do I download the jar for that version. Do I keep the old jar.
Thanks
Prerna
It doesn't matter what the Android version is of the jar file. That is only what target the application compiles with. If you want to change that, click on your project, File -> Properties -> Android and check the desired project build target (i.e. 3.2) and Apply.
I currently have an Android project in Eclipse.
I need to change target build in Project properties
but there is only Android 4.4 in the list
how can i add another target ? for example 2.1 or 2.2
In the list it only shows the SDKs that you have installed. If you want to build application with a specific version then in SDK manager download the SDK first and then use that for making a build.
Generally we make build only with the latest version. Why do you want to make a build with other version? If you want to support older version like 2.2 then you have to set that in minSdkVersion in your manifest file.
I made my app for Android 4.3 and I'm almost done with that but now I want to upgrade it for Android 4.4.
Will it work by adding android.jar ?
Steps to perform it.
Download latest version of android i.e Andriod 4.4 (API 19) using Android SDK manager.
Right Click your Project -> Properties -> Android -> Select desired API level
Update your Android Manifest file with min, max and target SDK support
You can not change android.jar file directly. You need to perform step 2 to do so.
No, it will not work ... you need to update the SDK with Android SDK manager first. Then update the Eclipse ADT plugin and then go to your Android project, set the Android project build path to 19 and change the targetSDK to 19 as well in the Manifest.
The android.jar JAR file does not contain the Android framework code, but only stubs for the type signatures, methods, types, etc. The android.jar JAR file is only used for the Java compiler before deployment on an Android device. It is not bundled with your application. Once your application is deployed on the device / emulator, it will use the android.jar JAR file on the Android device. Calling methods from the android.jar JAR file throw a new RuntimeException("Stub!").
I'm trying to add a 2.2 sdk to my project and can't seem to figure out how. I tried adding it as an external JAR in the Android sdk folder but ive encountered some errors. How could I add another Android sdk to a previously made Android project?
What you're trying to do is change the SDK version that you're project is targeting. You do not do this by including another jar in your project, you do it by changing the target SDK and minimum SDK for you project. Take a look here on how to do that and for more information:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
You can't add an SDK to a project, but you can set your project to use a different SDK. To do this, you need to edit the properties of the project (Right-click on the project head in eclipse, and select "Properties"). You can change the SDK to any that you have downloaded through the eclipse plugin.
Note that if you want to support different levels of SDKs, you need to have your project targeted for the lowest of the two platforms. For instance, if you want your project to be compatible with both 1.6 and 2.2, you need to set your project target SDK to 1.6.
An alternative to this would be to create 2 different versions of your application and release them to market.
its simple
right on properties of a project
select android on left side menu
change the sdk version
thats it......