gpt4 book ai didi

android - 错误 : Failed to find target with hash string 'android-28'

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:42:29 25 4
gpt4 key购买 nike

当我在 build.gradle(Project: Allo) 中同步我的项目时,我看到了这个错误

Failed to find target with hash string 'android-28'in: C:\Users\hacker\AppData\Local\Android\Sdk

配置:

apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.android.allo"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0 rc2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.android.support:design:28.0.0 rc2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

and this is the image

最佳答案

阅读Set Up the Android P SDK .

android {
compileSdkVersion 'android-P'

defaultConfig {
targetSdkVersion 'P'
}

For the best development experience with the Android P Preview SDK, we recommend that you install the latest Android Studio 3.2 canary.

您应该按如下方式安装 Android P Preview SDK:

  • 单击工具 > SDK 管理器

  • 在 SDK 平台选项卡中,选择 Android P 预览

  • 在“SDK 工具”选项卡中,选择 Android SDK Build-Tools 28-rc2(或更高)。

  • 单击“确定”开始安装。

关于android - 错误 : Failed to find target with hash string 'android-28' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50420428/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com