大佬教程收集整理的这篇文章主要介绍了Android Studio Gradle Build失败 – 要求提供不存在的sdk版本,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
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工作室说这个包不可用/不存在下载.
@L_874_16@
单击前面提到的错误代码会打开一个名为v28 / values-v28.xml的文件.
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="Base.Theme.AppCompat" parent="Base.V28.Theme.AppCompat"/> <style name="Base.Theme.AppCompat.Light" parent="Base.V28.Theme.AppCompat.Light"/> <style name="Base.V28.Theme.AppCompat" parent="Base.V26.Theme.AppCompat"> <!-- We can use the platform styles on API 28+ --> <item name="dialogCornerRadius">?android:attr/dialogCornerRadius</item> </style> <style name="Base.V28.Theme.AppCompat.Light" parent="Base.V26.Theme.AppCompat.Light"> <!-- We can use the platform styles on API 28+ --> <item name="dialogCornerRadius">?android:attr/dialogCornerRadius</item> </style> </resources>
这是我的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 Studio Gradle Build失败 – 要求提供不存在的sdk版本全部内容,希望文章能够帮你解决Android Studio Gradle Build失败 – 要求提供不存在的sdk版本所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。