Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native: how to update to build tools 23.0.2?

When build production, signed, apk, I noticed these rows in the output:

Running dex in-process requires build tools 23.0.2.
For faster builds update this project to use the latest build tools.

I (think to) remember that it's mandatory to have android build-tools at exact version 23.0.1.

What must I do to update the project ?

UPDATE

I uninstalled build-tools 23.0.1 and installed 23.0.3.

Then I updated build.gradle file as suggested from sfratini, but I got this when building:

Checking the license for package Android SDK Build-Tools 23.0.1 in C:\Users\realtebo\AppData\Local\Android\Sdk\licenses 
License for package Android SDK Build-Tools 23.0.1 accepted. 
Preparing "Install Android SDK Build-Tools 23.0.1".

Of course, the suggestion to use lastest build-tool is disappeared, but I cannot understand why the old build-tool is automatically forcely installed.

like image 254
realtebo Avatar asked Mar 10 '17 18:03

realtebo


People also ask

How do I update my build tools?

Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences). In the left panel, click Appearance & Behavior > System Settings > Updates. Be sure that Automatically check for updates is checked, then select a channel from the drop-down list (see figure 1). Click Apply or OK.

How do I upgrade buildToolsVersion in react native?

To do so open android/build. gradle in your React Native project and then increment the compileSdkVersion and targetSdkVersion values to 29 . buildscript { ext { buildToolsVersion = "28.0. 3" minSdkVersion = 16 compileSdkVersion = 29 targetSdkVersion = 29 } // ... }


1 Answers

I am actually using 23.0.3 with no issues so far. Just update your gradle file:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

If you put your cursor over the version, AS might even prompt you to update the version.

like image 185
sebastianf182 Avatar answered Nov 08 '22 11:11

sebastianf182