Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I Know My System Available Gradle buildToolsVersion

Tags:

android

gradle

This issue is encountered when my Android Studio project is copied by others, but they can'r run it directly.
The error message is failed to find build tools versions XX.X.X.
Then how do they know what the version should be changed for their own system?
Or is there a better way to set the buildToolsVersion "XX.X.X" to widely suit others in build.gradle?
Also the same question for compileSdkVersion, how do I know the version(s) available in my system?
Is there a gradle(not limited) script to find out the available version?

like image 668
xuanzhui Avatar asked Aug 28 '15 02:08

xuanzhui


2 Answers

On Linux you'll find your BuildTool Versions on :

$ANDROID_HOME/build-tools/

like image 87
suther Avatar answered Nov 11 '22 12:11

suther


Look at your build.gradle (Module:<app-name>) file. There should be a buildToolsVersion line in that file. Make sure that you and others have that version of the build tools installed.

Also make sure that the version of build tools is still available form the SDK manager.

I had this issue when working on a friend's project. He was using a version of build tools that I could not get anymore. I think this is because things are updated and replaced.

We fixed this by both installing the most current version of build tools.

I have also ran into this issue when I upgraded Android Studios and the version of build tools was no longer available.

For the compileSdkVersion you can goto Tools > Android > SDK Manager. This will pull up a window that will allow you to manage your compileSdkVersion and your buildToolsVersion.

You can also select the link at the bottom left (Launch Standalone SDK Manager) this will give you a little bit more information.

like image 30
Noah Herron Avatar answered Nov 11 '22 11:11

Noah Herron