Android: Build Tool Version vs Compile SDK Version - android

We have an android app where we had both compile SDK version and Build tool version at 24. We had to update the android com.android.support:design version from 24.0.0 to 25.0.0. In this case, it was asked to update the compile SDK version into 25 from 24, but did not say anything about Build Tool Version.
Normally, how does the Build Tool Version and Compile SDK version work? Build Tool Version is in a lower version than Compile SDK version, any possible errors (run time or whatever, either in android playstore or development environment)
Update
This question is not a duplicate, the suggested answer is about the differences between the SDK and Build tool version and also about having a higher build tool version with lower sdk version; this is the exact opposite of what I am asking, higher SDK with lower build tool 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.

With Android gradle plugin 3.1.0 is it still best to manually specify the android build tools?

In release 3.1.0 of the Android gradle plugin release notes (https://developer.android.com/studio/releases/gradle-plugin) Google writes that the plugin requires:
Build Tools 27.0.3 or higher. Keep in mind, you no longer need to
specify a version for the build tools using the
android.buildToolsVersion property—the plugin uses the minimum
required version by default.
It says it will auto-select the "minimum". So what happens if a fix or improvement is released to the android tools? For example the minimum is 27.0.3 but 28.0.2 has been released with a new version of D8 that may have fixes or improvements but the plugin will continue using 27.0.3 if not otherwise specified so it still seems best to manually select the build tools as needed so you aren't stuck on the minimum version required?
It's the minimum required version, you can keep it as it is now but it's highly recommended to update to the newest version.

The specified Android SDK Build Tools version (19.0.0) is ignored

Warning:The specified Android SDK Build Tools version (19.0.0) is
ignored, as it is below the minimum supported version (26.0.2) for
Android Gradle Plugin 3.0.1. Android SDK Build Tools 26.0.2 will be
used. To suppress this warning, remove "buildToolsVersion '19.0.0'"
from your build.gradle file, as each version of the Android Gradle
Plugin now has a default version of the build tools.
What if I want to develop an apk that can work for API 19?
Is there a way without getting errors to compile and test the application easily?
buildToolsVersion is not your App's minimum API support version. You'll want to use minSdkVersion 19 to support API 19. Generally you'll always want to use the latest build tool version. If you want to test API 19 functionality, download and use the Android 4.4 emulator.

SDK Platform Tools release

Although all my libraries are up-to-date, the version of SDK platform tools is a problem because it remains lower than the current version (Android SDK Platform-Tools is 26.0.2, Build is 27.0.1). So from my build.gradle, I have :
implementation 'com.android.support:support-v4:27.0.1'
that shows an error
Found versions 27.0.1, 26.0.1, 25.2.0 . Example include com.android.support..."
even with many invalidate cache and restarts.
So my question is: should I downgrade my targetSDKversion to 26 or maybe 25, or can I run my project with this error message? I use AS 3.1 Canary 4.

Why i can't compile my android project with other APIs

i want to build an android project for API 19 so i choose this API to compile with, but when eclipse create the projects its tells me that some ressources are not found and the R class is not generated. the only way to avoid this errors is to compile with API21
So why i can not use my API 19 in compilation ??
THNKS for all
Compile SDK Version can and should always be set to the latest SDK released. It is target SDK version that you should set to the latest version you've tested your app on.
Eclipse by default includes AppCompat - the part of the Support Library which ensures a consistent look and feel across all API versions v7+ and the newest version, revision 21, compiles against API 21.
So why i can not use my API 19 in compilation ?
be sure to have the api installed:
Window -> Android SDK Manager

Categories

Resources