Search code examples
androiddrawabledpi

Drawable folder picking when building an application in android


I am developing an Android application in which I have resources in

drawable-sw360dp-xhdpi and drawable-sw800dp-xhdpi

When I ran the application(in 360dp device) the resources are picked from both these folders and are present in the final apk. I was getting no compile time errors in eclipse.

But, when I am opening the application(at runtime), the resources which are present in 800dp folder are causing problems, saying

inflateexception binary xml file error inflating class <unknown>

Only when I copy the resources from 800dp folder to 360dp folder the exception was not coming. Even when I extracted the apk also, both these folders were present.

Why is this exception coming and why both the folders were present in the final apk?


Solution

  • May be you have used same layout for both, because of which it is giving error ,just check your layout or name of the resources used.