8

when I use 27 platform I have this error

I update my android studio to 3.1.3 but I cannot use platform 27 now when I click "install platform and sync project" it pop up a download window and then disappear. But the error still exist. SDK Platforms is following: SDK Platforms

expand SDK:expanded SDK here

Qinxin Zhang
  • 213
  • 4
  • 11
  • It is quite likely that the download of android 27 sdks was not complete because it takes quite a while to fully download all the necessary libraries for any android-version platform to work. Can you expand the android - 27 (Android 8.1) section in your SDK platforms and post a screenshot of what all has been downloaded? – Rajan Prasad Jul 10 '18 at 04:56
  • I have add picture@Raymond232 – Qinxin Zhang Jul 10 '18 at 05:02
  • This seems alright. Can you try to take a snapshot of the dialog box before it closes? Can you tell what does the dialog box show? An error or just that the platform is already downloaded ? – Rajan Prasad Jul 10 '18 at 05:05
  • @Raymond232 the window said downloading and then disappeared – Qinxin Zhang Jul 10 '18 at 07:27
  • Hmm, maybe try the solution mentioned in the answer. It is a weird behaviour. So if the solution works for you, please let me know. – Rajan Prasad Jul 10 '18 at 08:06
  • @Raymond232 yes it works thank you so much! – Qinxin Zhang Jul 10 '18 at 08:07
  • I had this issue after Windows update/ Some user permission security issue I suspect (haven't deep into it). The problem resolved as soon as I've moved the SDK to HD root – Yan Jan 24 '19 at 10:23

7 Answers7

5

For anyone get this issue, you should uninstall Android SDK 27 then re-install it from SDK download manager.

Harry T.
  • 3,478
  • 2
  • 21
  • 41
4

@TrongHiue's answer didn't work for me. (Mac user, Android 3.2.1).

I had to close the IDE, go to Library/Android/sdk and rename the 'sdk' folder to 'sdk2'. Then reopen Android Studio - it will prompt you to tell you it can't find the old sdk folder but will automatically use sdk2. Hit ok. Then, let Android Studio re-index. It will now find platform 27 and you should be able to launch your app.

If you want to change your sdk folder back from skd2 to sdk, close the IDE, rename back to 'sdk', re-open the IDE, update the SDK location in File -> Project Structure, and make sure local.properties is pointing to 'sdk' folder and not 'sdk2'.

  • It's strange. I find this approach is required for some other add ons, like the Zebra EMDK - for any other poor soul who has to use that. – xavierdominguez Nov 06 '19 at 14:46
2

In my case, I fixed it by click "Edit" (Next to Android SDK Location) and install SDK platform at SDK Setup window.

Click here to see image

1

For me neither options worked.

I've updated to SKD 29 and Android Studio 3.6.

What did help was going to the SDK Manager and click the "Edit" link next to Android SDK Location. In the next screen you will see a message saying that an existing Android SDK was detected and only missing or outdated SDK components will be downloaded. Click Next and problem solved!

enter image description here

enter image description here

0

Ran into same problem but with API 26 and (win) studio 3.5.1. XavierDominguez solution was close to what I had to do to fix it. Close IDE, renamed Sdk to Sdk2, reopened studio, problem persisted so closed IDE, renamed it back to Sdk, reopened and worked this time around. Posted in case someone ran across same problem.

Jason
  • 15
  • 1
  • 7
0

This usually happens when popup for update tools and you click on Update and after some time before finishing Update you Cancel It. Simply Go to FIle--> Invalidate Caches/Restart

0

This can happen when your sdk location directory has space in it. Change directory without space and re-build the project. It worked for me.

Old SDK Location: "C:\Users\DELL 15\android-sdks" New Location: "C:\Users\android-sdks"

Rockit Rockit
  • 146
  • 1
  • 5