在我现有的项目中创建新的 compose activity 时出现构建问题
Creating new compose activity in my existing project am getting build issue
Caused by: [style/AppTheme.NoActionBar]
C:\Users\Hp\StudioProjects\robin\app\src\main\res\values\styles.xml
[style/AppTheme.NoActionBar]
C:\Users\Hp\StudioProjects\robin\app\src\main\res\values\themes.xml:
Error: Duplicate resources
- 这是因为“style/AppTheme.NoActionBar”已经存在于
您在 styles.xml.
下的现有项目
- 您需要检查资源下的themes.xml文件。
- 此 themes.xml 文件是在您创建空撰写时默认创建的 activity.
- 删除此 themes.xml 将解决问题。
Caused by: [style/AppTheme.NoActionBar] C:\Users\Hp\StudioProjects\robin\app\src\main\res\values\styles.xml [style/AppTheme.NoActionBar] C:\Users\Hp\StudioProjects\robin\app\src\main\res\values\themes.xml: Error: Duplicate resources
- 这是因为“style/AppTheme.NoActionBar”已经存在于 您在 styles.xml. 下的现有项目
- 您需要检查资源下的themes.xml文件。
- 此 themes.xml 文件是在您创建空撰写时默认创建的 activity.
- 删除此 themes.xml 将解决问题。