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?
On Linux you'll find your BuildTool Versions on :
$ANDROID_HOME/build-tools/
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With