首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >修改编译器版本时出错--为什么?

修改编译器版本时出错--为什么?
EN

Stack Overflow用户
提问于 2019-12-19 12:24:37
回答 1查看 105关注 0票数 1

在android中,我正在开发一个应用程序,当我想将编译器版本更改为26时,它会给出以下错误:

5-8: 13: AAPT: error: resource : attr / dialogCornerRadius未找到。

使用将我发送到以下代码的链接:

代码语言:javascript
复制
<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>

我的应用程序文件代码:

代码语言:javascript
复制
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
    applicationId "com.example.ocr"
    minSdkVersion 15
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

依赖关系:

代码语言:javascript
复制
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
//image crop library
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
//image to text google library
implementation 'com.google.android.gms:play-services-vision:19.0.0'
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-12-19 12:46:24

5-8: 13: AAPT: error: resource : attr / dialogCornerRadius未找到。

您应该使用compileSdkVersion 28

代码语言:javascript
复制
android {
    compileSdkVersion 28
    buildToolsVersion  28.0.3
    defaultConfig {
        targetSdkVersion 28
    }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59409768

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档