Music
Music

Reputation: 29

How to Add Images to Android Studio 2024 Ladybug?

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

Answers (3)

Jaime
Jaime

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

Music
Music

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.

enter image description here

Upvotes: 0

Navya
Navya

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

Related Questions