美文网首页
Error: Can't determine type for

Error: Can't determine type for

作者: 茶叶花 | 来源:发表于2023-06-27 09:52 被阅读0次

    问题

    /.gradle/caches/transforms-3/92cd17329ac6b486798490110934dc61/transformed/material-1.9.0/res/values/values.xml: Resource and asset merger: Can't determine type for tag '<macro name="m3_comp_assist_chip_container_shape">?attr/shapeAppearanceCornerSmall</macro>'

    代码中依赖版本

        public static String appcompat = "androidx.appcompat:appcompat:1.6.1";
        public static String material = "com.google.android.material:material:1.9.0";
    

    Android gradle 插件版本

    plugins {
        id 'com.android.application' version '7.0.2' apply false
        id 'com.android.library' version '7.0.2' apply false
    }
    

    原因

    gradle 插件和依赖组件版本不一致导致的

    解决方案

    • 方法一、降低版本依赖组件版本
        public static String appcompat = "androidx.appcompat:appcompat:1.4.1";
        public static String material = "com.google.android.material:material:1.6.0";
    
    • 方法二、升级 android gradle插件及关联配置
      在根build.gradle 中更改如下
    plugins {
        id 'com.android.application' version '7.2.2' apply false
        id 'com.android.library' version '7.2.2' apply false
    }
    

    gradle-wrapper.properties

    #Tue May 30 21:07:37 CST 2023
    distributionBase=GRADLE_USER_HOME
    distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
    distributionPath=wrapper/dists
    zipStorePath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    
    

    相关文章

      网友评论

          本文标题:Error: Can't determine type for

          本文链接:https://www.haomeiwen.com/subject/ghtnydtx.html