日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

android sdk v28,Android Studio Gradle Build失败 – 要求提供不存在的sdk版本

發布時間:2025/3/20 Android 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android sdk v28,Android Studio Gradle Build失败 – 要求提供不存在的sdk版本 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

24小時前我的項目完美構建,沒有錯誤.在不更改單個代碼的情況下,當我恢復工作時,它將不再構建.

簽出舊的工作提交現在會產生相同的錯誤.

這些是我得到的錯誤代碼:

Information:Gradle tasks [assemble]

Error:(9,5) error: resource android:attr/dialogCornerRadius not found.

/home/liam/.gradle/caches/transforms-1/files-1.1/appcompat-v7-28.0.0-alpha1.aar/536e4dd78846259cf8bef0fd6a3ea0e6/res/values/values.xml

我認為這是由Android P發布和我的Android Studio自動升級或類似的東西引起的.這可以解釋為什么有效的舊提交會得到同樣的錯誤.

這將是一個非常新的問題,這可以解釋為什么我還沒有找到解決方案.

搜索這些錯誤代碼會導致類似的問題,可以通過更改gradle構建文件中的SDK版本來解決.我的問題與此不同,因為更改為SDK 28(我很確定28甚至不存在)導致android工作室說這個包不可用/不存在下載.

單擊前面提到的錯誤代碼會打開一個名為v28 / values-v28.xml的文件.

?android:attr/dialogCornerRadius

?android:attr/dialogCornerRadius

這是我的gradle文件:

apply plugin: 'com.android.application'

android {

compileSdkVersion 26

defaultConfig {

applicationId "com.timelord.timelord.timelord"

minSdkVersion 24

targetSdkVersion 26

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:26.1.0'

implementation 'com.android.support:design:+'

implementation 'com.android.support.constraint:constraint-layout:1.0.2'

testImplementation 'junit:junit:4.12'

androidTestImplementation 'com.android.support.test:runner:1.0.1'

androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

implementation files('libs/joda-time-2.9.9.jar')

}

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {

google()

jcenter()

}

dependencies {

classpath 'com.android.tools.build:gradle:3.0.1'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

google()

jcenter()

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}

總結

以上是生活随笔為你收集整理的android sdk v28,Android Studio Gradle Build失败 – 要求提供不存在的sdk版本的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。