3

I'm following this tutorial page

and i get the exact same error that they say in that page

Failed to find target with hash string 'android-P' in: D:\Development\Android\Sdk Install missing platform(s) and sync project

enter image description here

when i click

install missing platform(s) and sync project it shows the error as

enter image description here

All packages are not available for download! The following packages are not available:
- Package id platforms;android-P

enter image description here

enter image description here

I have installed almost all the SDK it asks for ANDROID - P.

James Z
  • 12,209
  • 10
  • 24
  • 44
Nishanth Kr
  • 113
  • 2
  • 9

3 Answers3

4

you're trying to find a SDK that corresponds to the version "android-p". Have a look at your build.gradle file: android { compileSDKVersion 'android-p' .......... }

change it to android { compileSDKVersion 28 .......... } note that the version 28 is just one example, you could be using any version.

that should do the job for you.

Bevilaqua
  • 730
  • 1
  • 6
  • 13
0

It looks like issue is ralated to checksums in repositories. Take a look at this answear: https://stackoverflow.com/a/50842352

Rod
  • 1
0

I followed the answer of Bevilaqua

Then, a dialog poped to make a Gradle Plugin Update : Android Gradle Plugin Update Required

Of course, it failed : enter image description here

So, to fix it, I manually installed a recent version of Gradle from enter link description here in my .gradle folder (in Windows C:\Users\...\.gradle\wrapper\dists\)

And I got another problem because a these line in styles.xml : <style name="Widget.Shrine.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlineBox"> where I replaced OutlineBox by OutlinedBox : <style name="Widget.Shrine.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox"> (Source)

Now, everything is functional.