Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio - Failed to find target with hash string 'android-28'

I want to use navigation component and some other tools that I need to upgrade to android api 28 . this is my gradle :

android {
compileSdkVersion 28
defaultConfig {
    applicationId "ir.persiandesigners.edu"
    minSdkVersion 14
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}

the problem is , when I sync the project , it get this error :

    Failed to find target with hash string 'android-28' in: C:\sdk
Possible cause: Build properties not found for package Android SDK Platform 28
Install missing platform(s) and sync project

i've installed the necessary files from my sdk manager , these are the images :

enter image description here

enter image description here

enter image description here

I've tried rebuild, clean the project and lots of other works but it doesn't work still

how can I solve this issue and use android api 28 ?

like image 892
Navid Abutorab Avatar asked Dec 09 '25 21:12

Navid Abutorab


1 Answers

Downgrading the Android SDK Build-Tools from version 29-rc2 to version 28 may help there.

Go to this directory once and verify the download succeeded - eventually download API 28 again.

You could also upgrade the Intel HAXM driver to the current version.

like image 78
Martin Zeitler Avatar answered Dec 12 '25 14:12

Martin Zeitler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!