0

Periodically, Android Studio shows error

 Error: Please select Android SDK

in edit configuration.

Gradle version: 4.10.2

Following things don't help:

  • Sync Project with Gradle Files
  • Invalidate Caches and Restart

I understand this question is similar to Android Studio: "Please select Android SDK" but this question is specific for Android Studio version 3.1.2+

In the above question, comment https://stackoverflow.com/a/50000408/ solves issue temporarily but no such robust solution.

Does anyone face this issue?

Avinash Shinde
  • 199
  • 2
  • 12
  • Can you follow @Andras Kloczl answer in this link??. [Android Studio: “Please select Android SDK”](https://stackoverflow.com/questions/34353220/android-studio-please-select-android-sdk) – Ali Nov 28 '18 at 06:10
  • I have already linked that answer in the description, it's a temporary solution. I do that whenever this problem occurs. But it comes constantly. I lose all my shelves and project settings – Avinash Shinde Nov 28 '18 at 06:12
  • how about your `local.peroperties`? is the `sdk.dir` properly set? – shizhen Nov 28 '18 at 06:19
  • Yeah, it is properly set. This error is just random, comes out of nowhere every morning. And I have to close project everyday – Avinash Shinde Nov 28 '18 at 06:21

1 Answers1

1

I was facing this issue too. I fixed it by updating Android studio so that it matches the gradle build tools version.

This version number:

Gradle build tools version number

needs to match this version number:

Android Studio version number

JSDBroughton
  • 3,966
  • 4
  • 32
  • 52
proxyhatch
  • 11
  • 1
  • I found that simply upgrading A.S. did it for me even though my gradle build version is `3.3.0` and does not match the `3.4.1` of the A.S. upgrade. So I'm guessing A.S. >= gradle in general could work. – abettermap Jul 03 '19 at 00:30