3

Okay its weird error though, but I will explain it, actually I did remove "emulator" folder from my android SDK folder because it's causing android studio to slows down on ita knees, and when I did it, it throws a Gradle related error like "Can not read from some file", well for that i did reinstall Gradle 4.1 and error gone, but the weirdest problem occurred, now i can not import any class except appcompatactivity and constraint layout which I implemented in build.gradle , for those who wonder what I have messed up with the Android SDK folder, I want to tell you guys I just downloaded everything from scratch except having JDK 1.8.0_171. I mean I can not even import core java classes or anything, studio is pointing out for "please specify android SDK" or something, but hey I have already fresh SDK, what will be the issue, help me guys, and I swear I will never mess with SDK, am running out of time, already wasted too much time with this, Thank You !

Rahul Singh
  • 243
  • 3
  • 15

3 Answers3

5

Okay so finally i deleted C:/users/username/.AndroidStudio3 folder with all files in it! Works like charm ! An stupid solution for a stupid problem, btw problem solved ! Thanks everyone !!

Rahul Singh
  • 243
  • 3
  • 15
0

You need specify the SDK in Modules section in Project Settings.

Right Click your Project Name in Android Studio and Select Settings..

enter image description here

or

Perform these three steps

  • Open gradle.buld in your app module
  • Change minSdkVersion and sync gradle
  • Revert back your minSdkVersion and sync gradle again
amit
  • 709
  • 6
  • 17
  • How ? I mean another screen shot please! Consider me as frustrated novice ! Brother ! – Rahul Singh Jun 25 '18 at 10:11
  • Ah, nothing, can't help it! Please help me to overcome this ! – Rahul Singh Jun 25 '18 at 10:24
  • i think, you missed that third step... Revert back your minSdkVersion and sync gradle again – amit Jun 25 '18 at 10:26
  • I reverted back ! Am listening to you carefully! Just guide me though – Rahul Singh Jun 25 '18 at 10:27
  • try solutions from [here](https://stackoverflow.com/questions/34353220/android-studio-please-select-android-sdk/40356815#40356815) – amit Jun 25 '18 at 10:51
  • First of all thanks for all your effort in my question, unfortunately none of these answers works well in my context and btw i have to find some another way to solve this and as always thanks for the support god bless you guys!!! – Rahul Singh Jun 25 '18 at 12:00
  • @Rahul you can answer your own question and explain how you solved your problem..and share your knowledge, it will help others facing the same problem.. you will also earn reputation points.. – amit Jun 25 '18 at 16:18
0

Close the current project and go to project location directory and delete

.idea folder

You can open your project again. This worked for me and problem comes most often when you are working with VCS. And this problem is not associated with android component classes but also to the libraries, both shows the same error.

sumit sonawane
  • 1,525
  • 1
  • 9
  • 15