Tippu Fisal Sheriff
Tippu Fisal Sheriff

Reputation: 2846

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

Upvotes: 1

Views: 606

Answers (1)

Lubna mariyam
Lubna mariyam

Reputation: 402

  1. This is because of "style/AppTheme.NoActionBar" already present in your existing project under styles.xml.
  2. You need to check for the themes.xml file under the resources.
  3. This themes.xml file is created by default when you create an empty compose activity.
  4. Deleting this themes.xml will sort out the issue.

Upvotes: 2

Related Questions