cross-posted from: https://lemm.ee/post/46066494
I followed the recommended processes for adding images to my app, and it is being displayed correctly on the layout preview, but not at all on the app. I have vector assets, webp, png images, but none are being displayed.
The project is too big to put here in its entirety, but please ask for any snippets that could help you solve the issue. I’ve tried searching the web and asking LLMs and neither could help, so please help me, fellow humans.
I’ve tested it on 3 real phones, I imported the vector graphics from the google database of default vector graphics and followed the android studio docs page on how to import images, I used the srcCompat attribute and added vectordrawable to the build.gradle.kts.
How do I share my project settings? Is that a file?
Share your gradle.kts and a screenshot from this menu:
File>ProjectStructure ( https://developer.android.com/studio/projects#ProjectStructure )
Tap for Kotlin script
plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) }
android { namespace = “org.jackgreenearth.materialmusic” compileSdk = 35
}
dependencies {
}
I’ll look into it on the weekend in detail if nobody else can spot the issue until then.
So far, everything looks normal and I didn’t see anything in the log at a glance. (besides a bunch of res related warnings that I am not sure about)
Are the images in your res folder / do you see them when you go to
View > Tool Windows > Resource Manager
?I do see them when I go to the resource manager