创建新项目报错“Can't determine type for tag '<macro name="m3_comp_bottom_app_bar_container_color">?attr/colorSurface</macro>'”
如图,报错提示无法确定values.xml文件中macro标签的类型,根本原因在于配置文件版本问题,

看一下app目录下的build.gradle文件,将 dependencies 闭包下这两行
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
替换为
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
后工作正常
使用当前版本的Android Studio(从4.2.1更新到2021.2.1并使用推荐的gradle插件)后问题得到解决
您必须使用高于 1.7.0-alpha02 的版本,请确保您的应用程序使用最低要求的插件版本

浙公网安备 33010602011771号