Reputation: 29
I am trying to add images to my Android app by adding to res->drawable->image asset, but the images are being added.
Instead it is adding images as icons and not as background images.
How can I add images to Android as image assets.
Upvotes: 0
Views: 717
Reputation: 1
I think I found a solution. Put those lines on your Gradle, inside the Android space:
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
sourceSets["main"].res.srcDirs("src/androidMain/res")
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
And you can now add it, Move it to your folder in commonmain
if Android Studio saves them on main, and build the project.
Upvotes: 0
Reputation: 29
In android ladybug when i click add image asset i get this box. And i allows only icons and banners. I am unable to add an ordinary image.
Upvotes: 0
Reputation: 1
Resource Manager --> then click on "+ icon"(add resource to module) -->Import Drawable option working for me in Android Studio Koala Feature Drop | 2024.1.2.
Upvotes: 0