Change build tools to 21 - android

Warning : Project is building density based multiple APKs but using tools version 19, you should upgrade to build-tools 21 or above to ensure proper packaging of resources
Okay this above is the 2 errors that come up in my gradle console when I run my app. The app does not run and just stops. How would I change the build tools to 21?

In Android Studio :
Tools -> Android -> Sdk Manager and install build-tools 21.0.2.
change your build.gradle in android block
compileSdkVersion 21
buildToolsVersion "21.0.2"

Related

Is it okay to delete buildToolsVersion android studio because of a warning in the Asyncstorage library?

I open the Android studio project in React Native and a warning appears to delete the buildToolsVersion Asyncstorage library
I deleted it and the warning disappeared and what the buildToolsVersion function is in the React Native Library
WARNING: The specified Android SDK Build Tools version (25.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.1.
Android SDK Build Tools 28.0.3 will be used.
I want to know the use of buildToolsVersion and what it will do if I delete it
It is okay to remove buildToolsVersion. The warning happens if you use the lower version than required minimum supported version for Android studio. For an example Android Gradle plugin 3.4.1 required minimum 28.0.3 buildToolsVersion. So If you remove that line it will use the default version of the build tools. Still, if you want to mention the buildToolsVersion, just keep a higher version of buildToolsVersion as your gradle plugin requires. Try buildToolsVersion "29.0.0" for your requirement.

How to set the minimum SDK Build Tools version required in an Android Studio project?

When I try to run my React Native project in the Android emulator I get the following error:
The SDK Build Tools revision (23.0.1) is too low for project ':app'.
Minimum required is 25.0.0
My android/app/build.gradle file specifies:
buildToolsVersion "23.0.1"
On Android Studio, it also logs the same error for each of the packages I'm using:
I believe this started happening after I inadvertently updated some stuff that Android Studio suggested.
All the build.gradle files that I've checked specify version 23.0.1, but for some reason 25.0.0 seems to be overriding that setting.
How do I go about correcting this?
Ran into this issue and realized that the error is quite vague. Coming from an iOS background into React Native, I've had to learn a lot more about the Android ecosystem. The problem is that your project Gradle version is too high.
In your project's (top level) build.gradle you may be using:
classpath 'com.android.tools.build:gradle:2.3.1'
Gradle v2.3.1, implicitly sets the minimum SDK Build Tools revision to 25.0.0.
To fix, you can simply revert back to:
classpath 'com.android.tools.build:gradle:2.2.3'
This will allow your project's modules to use buildToolsVersions 23.0.1 or 25.0.2
Install required Build Tools version 25.0.0
Update buildToolsVersion in build.gradle file and sync project
Set compileSdkVersion 25 and targetSdkVersion 25
Clean and Build your project again
Finally, Run on device
Hope this will help~
May be you are updated your studio version and open your old project if you do that then you want to go to package explorer app and right click on it and open modual setting one window open then select the project and set the Gradle version
and android plugin version
example
My studio version is 2.3
then Gradle version = 3.3
and Android plugin version = 2.3.0
if you not find then create new project blank project and see the setting and apply on your project
Android SDK Build Tools are required to build Android apps (see https://developer.android.com/studio/command-line/index.html#tools-build). It's recommended to always use the latest version.
In your case react* libraries aren't compatible with current build tools version (23.0.1) so you need to upgrade (25.0.2 is the latest version at the moment).
The version is specified in build.gradle of your module. After syncing project everything would be fine or an error will be displayed that will suggest installing the missing version. Android Studio will do that for you.
android {
...
buildToolsVersion "25.0.2"
Uninstall all new-ones 'Android SDK Build-Tools' versions after comes 23.0.1 in SDK Manager and Sync and try again for that project only...

failed to find target with hash string 'android-22'

I have updated android studio with latest version and then after googling I also updated Android SDK with API 18 but still it gives the same error.
Just click on the link written in the error:
Open Android SDK Manager
and it will show you the dialogs that will help you to install the required sdk for your project.
Open the Android SDK Manager and Update with latest :
Android SDK Tools
Android SDK Build Tools
Then Sync ,Re-Build and Restart Your Project
Demo Code for build.gradle
compileSdkVersion 21 // Now 23
buildToolsVersion '21.1.2' //Now 23.0.1
defaultConfig
{
minSdkVersion 15
targetSdkVersion 19
}
Hope this helps .
Okay you must try this guys it works for me:
Open SDK Manager and Install SDK build tools 22.0.1
Sync gradle That'all
I modified build.gradle compileSdkVersion to 23 from 22 and targetSdkVersion to 23 from 22.
My API level was 23. I had to update the API version to 23 as well.
I had to import my project from Eclipse to Android Studio. It worked for me.
I had similar issue. I updated android studio build tools and my project didn't find "android-22". I looked in android sdk manager and it was installed.
To fix this issue I uninstalled "android-22" and installed again.
I created a new Cordova project, which created with latest android target android level 23. when i run it works. if i changed desire android target value from 23 to 22. and refresh the Gradle build from the Andoid Studio. now it's fail when i run it. i got the following build error.
project-android /CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java
Error:(217, 22) error: cannot find symbol method requestPermissions(String[],int)
I changed the target level in these files.
project.properties
AndroidManifest.xml
and inside CordovaLib folder.
project.properties
However, i also have another project which is using the android target level 22, whenever i run that project, it runs. Now my question is can we specify the desire android level at the time of creating the project?
I think you should install API 18 from android sdk if not already installed, otherwise you can try "invalidate caches and restart" (Find: File->invalidate caches and restart).
Change
compileSdkVersion 18
minSdkVersion 10
targetSdkVersion 18
in build.gradle in your app directory/module
Or Download Latest API Version
In sdk Manager download android 5.1.1, it worked for me
Open project.properties file and change the line with target=android-22 to the desired value.
For example:
target=android-19

AndroidStudio: Failed to sync Install build tools

Going crazy with this error from about a couple of hours.
The error is:
failed to find Build Tools revision 23.0.0 rc1
But I think to have all update (also the release candidate!)
This is the image: thank you.
Go to File > Project Structure > Select Module > Properties you will landing to this screen
Select Build Tools Version same as version selected in Compile Sdk Version.
Hope this will resolve your issue.
I could fix it by changing it to
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
}
in build.gradle file
I had the same issue, with Build Tools revision 24.0.0-rc4. The fix was to install the package using the command line.
~/Android/Sdk| ls -1 build-tools/
23.0.3
24.0.0-rc4
~/Android/Sdk| ./tools/android list sdk -a | grep "SDK Build-tools"
4- Android SDK Build-tools, revision 24 rc4
5- Android SDK Build-tools, revision 23.0.3
6- Android SDK Build-tools, revision 23.0.2
7- Android SDK Build-tools, revision 23.0.1
8- Android SDK Build-tools, revision 23 (Obsolete)
...
~/Android/Sdk| ./tools/android update sdk -a -u -t 4
...
~/Android/Sdk| ls -1 build-tools/
23.0.3
24.0.0-preview
24.0.0-rc4
(note that 4 in the android update sdk command above refers to the preceding list's number for the desired version, found at the beginning of the line).
The directory build-tools/24.0.0-rc4/ had been created when I installed the package from Android Studio's SDK Manager. The above method created build-tools/24.0.0-preview/.
My app-level build.gradle script uses the -rc4 version, as specified in the setup guide:
android {
compileSdkVersion 'android-N'
buildToolsVersion '24.0.0-rc4'
}
I do not understand the correlation between -rc4 and -preview or why specifying 24.0.0-rc4 picks up the -preview package, but it did fix the issue for me.
I have the same problem.
i have solved this issue by the following point.
First one is go to inside build.gradle app file and change this
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
}
with this one
android {
compileSdkVersion 22
buildToolsVersion "23.0.0"
}
I hope this will solve your issue.
I had the same problem and fixed it by going to File->Project Structure->Project and changing the Android Plugin Version to 1.3.0-beta1
Hope this helps!
I faced the same issue today,
And solved it easily by following points
1) Start the StandAlone SDK manager (To open the standalone sdk manager - Tools>Android>SDKManager> at Bottom YOu will see a link to launch StandAlone SDK manager)
2) Delete tha package of SDK Build Tools that you have already installed for e.g 24.0.0 rc4.
3) Close the standalone SDK manager then Restart Android Studio.
4) Once after restart the gradle will start building the project and you will get an alert download the package of SDK build tool and Sync. CLick on that and you will start downloading like that...
I hope this helps
I had the same problem, in my cases this happened because I changed the time on my computer to load .apk on google play. I spent a few hours to fix "this" problem until I remembered and changed the time back.
One of the answers ask you to use buildToolsVersion 23.0.0, but you would get buildToolsVersion 23.0.0 has serious bugs use buildToolsVersion 23.0.3. I did that then I started getting message buildToolsVersion 23.0.3 is too low from project app update to buildToolsVersion 25.0.0 and sync again. So I did that and it worked , So here are the final changes.
Inside app's build.gradle change this
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
}
with this one
android {
compileSdkVersion 22
buildToolsVersion "23.0.0"
}
based on your screenshot I can see you have BuildTools ver 23.0.0 rc2 installed. So to get it right open up your gradle build file "build.gradle(Module:app)" and edit buildToolsVersion part like that:
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc2"
}
In case you have multiple SDKs locations (might happen if you play around with multiple Android Studio versions and create new location for SDK, what I did), make sure to check the local.properties file (both of the project and of your module, if you have such structure) and check if the line sdk.dir=/home/yourSdkLocation points indeed to the SDK you want to use.
This was the reason it wasn't working for me and it has fixed this.
There may be some file access permission/restriction problems. First check to access the below directory manually, check whether your TARGET_VERSION exists, Then check the android sdk manager.
sdk/build-tools/{TARGET_VERSION}
Had the same problem. I my case the build.gradel(app) was missing buildToolsVersion "27.0.0". So I open a previously working project to determine the version and added this line buildToolsVersion "27.0.0". Now it works fine.
Hope this helps.
I was also facing the same problem with gradle. Now I have solved by installing the highlighted in red. To navigate on this page Open Android studio > Tool > Android > SDK Manager > Appearance & Behavior > System Settings > Android SDK > SDK Tools (from tab options) > Show Package details(check box on the right bottom corner). After installing these just refresh the gradle everything will be resolved.
In case you have error regarding 'SDK build-tools failed' while installing Android Studio, Then you can Download build-tools from - https://androidsdkmanager.azurewebsites.net/Buildtools
Go to File > Project Structure > Select Module > Properties
After that CLICK on your project which will shown in LEFT PANEL
Then Select Properties
Change Build Tool Version to 22.0.1
It works for sure
problem:
Error:failed to find Build Tools revision 23.0.0 rc2
solution:
File > Project Structure > click on Modules > Properties
Change Build Tool Version to 23.0.1
its work for me
enter image description here
Start the project structure( file>structure)
You can see:
on the left, modules list;
on the right, Properties>Build Tools Version
there maybe are more than one modules.
change "Build Tools Version" for every Module.
it works.

Gradle ADT 0.4 error: android.buildToolsVersion is missing

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.

Categories

Resources