Hello, I am having a persistent build error in a new Android Studio project and I have tried every possible solution.
The error is:
ERROR: C:\Users\ITsupport\AndroidStudioProjects\Ana\app\src\main\res\layout\activity_main.xml:16: AAPT: error: resource drawable/logo (aka com.example.finalapp:drawable/logo) not found.
This error happens even though I can physically see the logo.png file inside my app/res/drawable folder. The file name is all lowercase.
I am running Android Studio on a Windows machine. Here is everything I have already tried to fix this:
Verified Code: All my code (activity_main.xml, MainActivity.kt, build.gradle.kts, AndroidManifest.xml) is correct and synchronized.
Clean and Rebuild: I have used Build -> Clean Project and Build -> Rebuild Project many times. The build is successful, but the error appears when I try to run the app.
Invalidate Caches: I have used File -> Invalidate Caches / Restart multiple times.
Manual Deep Clean: I have closed the project, manually deleted the .gradle, .idea, and build folders from my project directory, and then re-opened the project to force a fresh sync.
Complete Reinstallation: I have completely uninstalled Android Studio from my computer, deleted all related settings files, and then performed a fresh, clean installation. I created a brand new project from scratch, and the same error still occurs.
Windows Features: I have enabled both Virtual Machine Platform and Windows Hypervisor Platform and restarted my computer.
Conclusion: The problem seems to be a deep environmental issue on my computer where the Android build tools (AAPT) cannot see or access the resource files, even when they definitely exist. I am out of ideas. Has anyone ever seen this kind of persistent error before?
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.