简体   繁体   中英

Android Appcompat library giving error at compile time

I have recently upgraded my Android SDK to 6.0, and imported the new v7 appcompat library in my workspace. But the appcompat lib shows error in values-v21 folder, styles_base.xml file. Error is as follows : error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.

What can be done to solve this error?

That means you have to upgrade your compileSdkVersion in the build.gradle file. Assuming you have imported the v23.0.0 release of AppCompat, your build file should be something like:

android
    compileSdkVersion 23 
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "your.id"
        minSdkVersion 11
        targetSdkVersion 23 
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        ....
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM