Google Play 应用市场,自 2021 年 8 月起,新应用需要使用 Android App Bundle (.aab)才能在 Google Play 中发布.
打包时出现 com.android.tools.build.bundletool.exceptions.BundleFileTypesException$FileUsesReservedNameException: File 'root/res/drawable/ic_menu_cc.png' uses reserved file or directory name 'res'.
尝试解决方案有
1.使用configurations
在当前module下build.gradle中加入
configurations { compile.exclude group: 'com.google.android' }
2.使用packagingOptions{}
packagingOptions { exclude 'res/drawable/ic_menu_cc.png' }
当错误资源较多时,太难处理,不建议这样做