我希望使用导航组件和其他一些工具,需要将Android API升级到28版本。以下是我的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'
}
}
问题在于,当我同步项目时,出现了以下错误:
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
我从SDK Manager中安装了必要的文件,这些是图片:
![在此输入图片描述](https://istack.dev59.com/tGdm3.webp)
![在此输入图片描述](https://istack.dev59.com/7nyJq.webp)
![在此输入图片描述](https://istack.dev59.com/0JPNW.webp)