After updating Android Studio to SDK 28, my app doesn't build anymore. I always get this error, which I don't know what I can do with it:
Android resource linking failed
C:\SDK\projects\EngineersWizard\app\src\main\res\layout\activity_form_beleuchtung.xml:18: error: attribute layout_scrollFlags (aka com.example.ren.engineerswizard:layout_scrollFlags) not found.
C:\SDK\projects\EngineersWizard\app\src\main\res\layout\activity_form_beleuchtung.xml:35: error: resource string/appbar_scrolling_view_behavior (aka com.example.ren.engineerswizard:string/appbar_scrolling_view_behavior) not found.
error: failed linking file resources.
Maybe anybody has an idea?
Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's 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. If you're using Android plugin for Gradle 3.0.0 or higher, your project automatically uses a default version of the build tools that the plugin specifies. To use a different version of the build tools, specify it using buildToolsVersion in your module's build.gradle, as follows:
android {
buildToolsVersion "29.0.0"
...
}
Related
According to the Android SDK Release Notes you no longer need to define the buildToolsVersion property in the project's build.gradle, as a default version is used
If you're using Android plugin for Gradle 3.0.0 or higher, your
project automatically uses a default version of the build tools that
the plugin specifies.
However, I am trying to configure our continuous integration server to sign the compiled application and I can't figure out which version of build tools to use.
If the build.gradle defines a buildToolsVersion then this can be extracted, but how would I find the "default" version pragmatically if none is defined?
All the documentation says to use the "default" or "recommended" version, but never defines how to find this
One does not calculate nor define the default/recommended value for buildToolsVersion, hence it defaults to the latest build-tools, always matching the target API level, which is being defined by the targetSdkVersion. the Release Notes of the SDK Build Tools read:
SDK Build Tools release notes
Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's 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. If you're using Android plugin for Gradle 3.0.0 or higher, your project automatically uses a default version of the build tools that the plugin specifies.
And most interestingly:
To use a different version of the build tools, specify it using buildToolsVersion in your module's build.gradle, as follows ...
This means, that one can simply remove the buildToolsVersion property from a module's build.gradle. before one always had to change two values when updating the target API - and even more often when updating the build-tools . There are also new requirements for the Play Store.
If you do not specify the buildToolsVersion, the Android Gradle Plugin will use its default build tools. For each AGP release, the default build tools version is documented.
At the moment of writing, the latest AGP version is 7.3.0, and it will use build tools 30.0.3 by default. (The latest build tools is 33.0.1.)
This is also clarified in the build tools release notes page:
If you're using Android plugin for Gradle 3.0.0 or higher, your
project automatically uses a default version of the build tools that
the plugin specifies.
I am using Android Studio 2.2.3. My app has always been compiling and working properly but suddenly today I received this error:
Error:Execution failed for task ':app:prepareComGoogleAndroidGmsPlayServicesAds980Library'.
> Failed to create parent directory 'C:\Users\[My path]\androidapp\build\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-ads' when creating directory 'C:\Users\[My path]\androidapp\build\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-ads\9.8.0'
I tried restarting Android Studio, using "File > Invalidate Caches / Restart...", and running Android Studio as an administrator, but the error persists. Any ideas about what may be the cause of this issue?
The solution was upgrading from Android 2.2.3 to Android 3.0.1. But then I was getting this error:
Warning:The specified Android SDK Build Tools version (23.0.1) 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 '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. Update Build Tools version and sync project<br>Open File
The solution was commenting out buildToolsVersion "23.0.1".
Failed to sync Gradle project
Error: failed to find Build Tools revision 24.1.2
However, Build Tools revision 24.1.2 does not exist. Before this error came up, Gradle was giving an error that it required android-19, even though the build.gradle file clearly specifies android-21. This was fixed by installing android-19.
However, because revision 24.1.2 does not exist for Build Tools, it cannot be worked around by simply installing this version. The build.gradle file specifies version 22.0.1, but it seems to be completely ignored. I also tried changing it from the app properties window but it still failed to compile.
What may be causing this is the fact that some of the code was developed on another computer, and slight differences are causing gradle to require incorrect version numbers.
How can this problem be fixed?
You should just open Android SDK Manager. It is the app where you install Android SDK and other helper apps.
When it is refreshed you should see there is Build Tools version 24.1.2 at the top. You should install that.
I've just checked and 24.1.2 is installed on my machine.
In android studio go to
Tool => Android => SDK Manager and update your build tools.
Check if it is installed ?
You may have a gradle configuration problem. Can you post your gradle config?
At the time of writing, the latest Android SDK Build Tools version is 22.0.1 and the latest Android SDK Tools version is 24.1.2.
This would be an example of a gradle config targeting the latest versions (no need to specify the SDK tools version):
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
...
Latest release notes can be found here:
Android SDK Build Tools:
https://developer.android.com/tools/revisions/build-tools.html
Android SDK Tools:
https://developer.android.com/tools/sdk/tools-notes.html
I hope this helps!
I have updated my Android Studio to Beta 0.8.6 but now am not able to build because I cannot seem to get the sdks working correctly. I have checked my path and it is pointing to the correct place and even tried it with different paths. But everytime I try to build I get the same error. I did have to replace my Android Studio to get the beta version but kept my preferences from my previous version.
Failed to sync Gradle project 'OlleyVotto'
Error:Error:The SDK Build Tools revision (19.0.0) is too low for project ':app:libraries:volley'. Minimum required is 19.1.0
install.build.tools">Install Build Tools 19.1.0, update version in build file and sync project.
I have installed the build tools and followed this direct link but keep getting the same error.
Update buildToolsVersion in build.gradle, like
buildToolsVersion '19.1.0'
And you may need to update your build tools in SDK Manager.
Attempting to build my Android project using the latest ADT tools release of Gradle, I get the following error:
Execution failed for task ':compileDebugAidl'.
> android.buildToolsVersion is missing!
Using Gradle 1.6, Android plugin 0.4.
Make sure that you've downloaded the latest ADT, SDK, Platform and Build tools. Then add this to your gradle build.
android {
buildToolsVersion "17.0"
compileSdkVersion 15
}
credit to the adt mailing group.
Note: It is important to put the " around the 17.0 as shown - otherwise that will not work
The buildToolsVersion value depends upon which version you downloaded from Google.
Assuming you installed the Android SDK, run "android" from the command-line, to open the Android SDK Manager. In the left column you'll see Tools | Android SDK Build-tools. That tells you whether or not you've installed the Build-tools yet.
After installing the Build-tools, look at the second column, labelled "Rev." It has the Build-tools version to use for gradle's buildToolVersion.