Android SDK Build Tool Multiple Versions - android

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.

Related

What advantages and disadvantages of upgrading build tools version android studio

I am an amateur Android developer and on my current projects I am currently using buildToolsVersion 27.0.3 and planning on upgrading to 28.0.3 to be able to use some of its new functionality.
I do understand that I would need to also change my libraries to refer to 28.0.3 for compatibility. I'd like to know how will my project be impacted upon upgrade.
Are there any classes/methods on libraries on lower build tool versions that don't exist anymore or have revised behaviors on higher build tool versions which can cause the app to behave differently?
The build tools would surely have bug fixes and enhancements that you might want to use. Check out the release notes of all the versions here.
SDK Build tools
It can bring in features like the D8 compiler, Java 8 support etc.
Currently, when you create a new project in Android studio, a default build tools version is attached to the gradle plugin. So, specifying a build tools version is not mandatory anymore. When the gradle plugin it updated, the build tools are also updated. However, if needed, you can still specify the build tools version that you want to use.
Upgrading to newer versions is always recommended. Generally, upgrading will not have any problems, especially between 27.0.3 to 28.0.3, although it depends on your project setup. You might have to update certain libraries to make the new versions compile and build your apps.

Identifying culprits for numerous XA0106 warnings when building Xamarin.Forms app on Android

We have a Xamarin.Forms application which uses quite a few packages.
When building, we're getting hundreds of XA0106 warnings like this one:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2,2): Warning XA0106: Skipping Musterd.Droid.Resource.Attribute.MediaRouteControllerWindowBackground. Please check that your Nuget Package versions are compatible. (XA0106) (Musterd.Droid)
I know that this is because of mismatches between support libraries used by packages. The problem is finding out which one(s)!
Is there any tool or build setting I can use which will help me home on which packages are causing this and so which I can/should update?
This can happen when the version of the Android SDK you are using is different to the version of the Android support packages used by your app. The support packages are versioned in a way that should match the compile time Android SDK.
The best fix is to always use the latest of both.
Update your Android SDK to have the latest stable installed.
Make sure your app compiles against the latest version in the project settings.
In the Android project update all NuGet Packages that start with Xamarin.Android to the latest version.

Can Android SDK tools be installed in Scala IDE?

I have Scala IDE installed and I want to add the Android SDK Tools to it. I'd rather not download the ADT Bundle and have 2 different copies of Eclipse on my system.
Can the SDK Tools be safely installed into Scala IDE, and how? Also will there be any further dependencies to install, or does Scala IDE contain everything needed for the SDK? I'm rather new to Eclipse and Android and I don't want to risk messing something up.
Why don't you just try ? :)
Both Scala IDE and the Android SDK are available as plugins for Eclipse (Scala IDE, Android SDK). And there is an extra plugin useful to simplify the configuration of a Scala + Android project (AndroidProguardScala). All the needed dependencies should get pulled automatically.
Finally, there is a short tutorial to tweak the example Android app for Scala. I didn't test it with the latest versions of everything, but it used to work very well.
On a side note, I would advise you to setup different Eclipse for different purposes. It is usually an better idea than trying to cram all the features you may need in one Eclipse installation.

Android SDK build tools

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

Keeping updated with the Android Support Library revisions

Eclipse provides a single click and download for the support library for an android project, and it adds it to the libs/ folder as "android-support-v4.jar"
The above jar has no reference to revision number (currently r10), so surely (unless I use maven) how are other people keeping up to date with the support library revisions?
I agree with #yorkw, the SDK manager tells you which version is currently installed. Also, using the android tools -> add support library will in-fact install a newer version if available, you will see that later in the SDK manager.
If what you are asking is how you know a new version is available so you can update? than the answer is definitely SDK manager, as yorkw said.

Categories

Resources