Error: Can't determine type for tag '<macro name="m3_comp_assist_chip_contai

问题

/.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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容