android - 错误 :(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'

标签 android gradle

首先我在将 gradle 更新到 2.10 时遇到错误,我下载了解压缩的 zip 并将其粘贴到路径中,但现在我收到此错误没有找到与给定名称匹配的资源
首先我在将 gradle 更新到 2.10 时遇到错误,我下载了解压缩的 zip 并将其粘贴到路径中,但现在我收到此错误没有找到与给定名称匹配的资源

 apply plugin: 'com.android.application'
    apply plugin: 'android-apt'
    def AAVersion = '3.3.1'

    buildscript {
        repositories {
            maven { url "http://dl.bintray.com/populov/maven" }
            mavenCentral()

        }
        dependencies {
            // replace with the current version of the android-apt plugin
            classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
            classpath 'com.android.tools.build:gradle:2.0.0-alpha1'





        }
    }

    repositories {
        mavenCentral()
        mavenLocal()

    }
    dependencies {
        apt "org.androidannotations:androidannotations:$AAVersion"
        compile "org.androidannotations:androidannotations-api:$AAVersion"
        compile 'com.squareup.okhttp:okhttp-android-support:2.5.0'
        compile 'com.squareup.okio:okio:1.6.0'
        compile files('libs/CleverTapAndroidSDK-v2.0.5-20160109.jar')
        compile files('libs/google-play-services_lib.jar')
    }

    apt {
        arguments {
            androidManifestFile variant.outputs[0].processResources.manifestFile
            // if you have multiple outputs (when using splits), you may want to have other index than 0

            // You can set optional annotation processing options here, like these commented options:
            // logLevel 'INFO'
            // logFile '/var/log/aa.log'
        }
    }

    android {
        compileSdkVersion 23
        buildToolsVersion '23.0.1'

        defaultConfig {
            applicationId "com.vedicrishiastro.kundli"
            minSdkVersion 15
            targetSdkVersion 23
            versionCode 5
            versionName "0.1.1"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    /*apt {
        arguments {
            //androidManifestFile variant.outputs[0].processResources.manifestFile
            // if you have multiple outputs (when using splits), you may want to have other index than 0

            // If you're using flavors you should use the following line instead of hard-coded packageName
             resourcePackageName android.defaultConfig.applicationId

            // You can set optional annotation processing options here, like these commented options:
            // logLevel 'INFO'
            // logFile '/var/log/aa.log'
        }
    }*/

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.clevertap.android:clevertap-android-sdk:2.0.5'
        compile 'com.google.android.gms:play-services'
        compile 'com.android.support:support-v4'

        compile project(':multilevelexpindlistview')
        compile 'com.android.support:appcompat-v7:23.1.0'
        compile 'com.android.support:support-annotations:22.2.0'
        compile 'com.android.support:support-v4:23.1.0'
        apt "org.androidannotations:androidannotations:$AAVersion"
        compile "org.androidannotations:androidannotations-api:$AAVersion"
        compile 'com.android.support:cardview-v7:21.0.+'
        compile 'com.github.traex.rippleeffect:library:1.3'
        compile 'com.android.support:recyclerview-v7:21.0.+'
        compile 'com.rengwuxian.materialedittext:library:2.1.4'
        compile 'com.android.support:design:22.2.0'
        compile 'com.squareup.okhttp:okhttp:2.4.0'
        compile 'de.hdodenhof:circleimageview:1.3.0'
        compile 'com.squareup.picasso:picasso:2.5.2'
        compile project(':library')
        compile 'com.github.medyo:fancybuttons:1.5@aar'
        compile 'com.jpardogo.materialtabstrip:library:1.1.0'
        compile 'com.melnykov:floatingactionbutton:1.3.0'
        compile 'com.google.android.gms:play-services-analytics:8.3.0'
        compile 'uk.co.chrisjenx:calligraphy:2.1.0'


    }
    android {
        lintOptions {
            abortOnError false
            checkReleaseBuilds false
        }
    }


    apply plugin: 'android-apt'
    apply plugin: 'com.google.gms.google-services'

最佳答案

您需要设置 compileSdkVersion 为 23 .

调用

  • compile 'com.android.support:appcompat-v7:23.1.0'
  • 升级buildToolsVersioncompileSdkVersion版本 。
    android {
    compileSdkVersion 23
    buildToolsVersion '23.0.1' 
    
    
    defaultConfig {
        minSdkVersion // Set yours
        targetSdkVersion 23
        versionCode // Set yours
        versionName "0.1.1" // Set yours
    
    }
    

  • 您可以访问 Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

    关于android - 错误 :(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35722403/

    相关文章:

    android - 如何使用 StaggeredLayoutManager 实现无限滚动

    android - Robolectric & Gradle : error: cannot access BufferedImage class file for java. 找不到 awt.image.BufferedImage

    Gradle 编译 : How to identify group and module from dependency?

    梯度依赖 :resolve analog like in maven

    android - 从 SQLite 数据库 android 中检索 BLOB

    android - 如何使用协调器布局和自定义工具栏更改 android 标题颜色

    gradle 3.0.* 的 Android 插件使用 Gradle 的新依赖配置 compileOnly 不使用资源引用

    java - gradle从所有jar中排除外部资源文件夹

    java - Android - 错误 list 合并失败

    gradle - Grails 3-Angular模板 Assets 管道不将转换后的js文件捆绑到application.js中