Error: Can't determine type for

2023-06-27  本文已影响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";
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

上一篇下一篇

猜你喜欢

热点阅读