This repository was archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
This repository was archived by the owner on Jan 11, 2024. It is now read-only.
Duplicate Resources #299
Copy link
Copy link
Closed
Description
In which task and step of the Codelab can this issue be found?
I've been following the above linked Codelab and ran into issues changing the app icon at Step 6: Changing app icon
Error: Duplicate resources after Android Studio autogenerating Bitmap icons.
How to reproduce:
- Go to > Project, on Project pane of Android Studio
- Go to
app/src/res/drawable - Delete
ic_launcher_foreground.xml - Download https://raw.githubusercontent.com/google-developer-training/android-basics-kotlin-tip-calculator-app-solution/main/app/src/main/res/drawable-anydpi-v26/ic_launcher_background.xml and https://raw.githubusercontent.com/google-developer-training/android-basics-kotlin-tip-calculator-app-solution/main/app/src/main/res/drawable-anydpi-v26/ic_launcher_foreground.xml
- Go to Resource Manger on Android Studio
- Click on "+" then select Image Asset
- Select "Foreground Layer" under path to above downloaded "ic_launcher_foreground.xml" and "Background Layer" to the downloaded "ic_launcher_background.xml" (both downloaded from the above steps)
- Click "Next" then "Finish" to autogenerate the icons
Next steps would be to build the application to apply the new changes in terms of the icons. I get a build message: Duplicate resources when I attempt to build the project.
Versions
_Android Studio version: Arctic Fox 🦊
_API version of the emulator: 26
Additional information
Note: Notice the icons under different densities on the side pane
Metadata
Metadata
Assignees
Labels
No labels
