0

I while building my project I am getting this error-

Error : [installPlatformSDK] build tools version 25.0.2 is not installed in SDK.

Weird thing is that this is present in my SDK.

Inside C:\xxxxxxx\AppData\Local\Android\android-sdk\build-tools, I have a folder 25.0.2 and it contains the build tools.

Now, if I change the build tools version in Gradle, from, say,

buildToolsVersion '25.0.2' to buildToolsVersion '25.0.1', I get this :

Failed to find Build Tools revision 25.0.1

Install Build Tools 25.0.1 and sync project

After I install build tools 25.0.1, I again get the same, first error (not found).

Community
  • 1
  • 1
kshubham07
  • 341
  • 1
  • 3
  • 15
  • This isn’t enough information to determine what is going on. I mean, you’re only telling us “I have this file here, but I build my project and it tells me that I can’t find it”. There’s no mention of what version of Gradle, Android Studio, Tools, SDKs, etc. you have, nor any other indication that you tried a new project and gave you problems as well. Evidenced by the lack of answers in over 12 hours (or one by Aaron who just tells you to restart android studio, which you don’t mention in your question). Try to be more specific if you need help, it will improve the question *and* the answer(s) – Martin Marconcini Apr 18 '18 at 19:26

1 Answers1

0

These are three TRICKS AND SUGGESTIONS I use when DESPERATE for Android Studio to behave:

1) Clean-->Rebuild-->Run (Clean and rebuild are options in the Build Menu);

2) invalidate cache and restart [Android Studio]

3) updating dependencies and the like. (I use build tools 27.0.3, for example, have installed new gradle plug-in, and created a wrapper using an updated version?) (see this link for more details)

4) throwing up my hands and asking someone to see if they can compile my code on their machine. In my most recent coursework, there were half a dozen times where my rig kicked out errors, but it worked for others. I ended up circling back occasionally and miraculously some errors worked themselves out.