Resource Problem in 1.5 when compiling against 2.2
<p>If I compile my app with the Android 2.2 SDK target, it will not run on Android 1.5. If I compile with 2.1, it works fine. The problem seems to be in finding some of my resource files. Here's the stack dump:</p>

<pre><code>09-06 11:22:15.387 W/ResourceType( 2702): Failure getting entry for 0x7f020004 (t=1 e=4) in package 0: 0xffffffb5
09-06 11:22:15.397 W/System.err( 2702): android.view.InflateException: Binary XML file line #22: Error inflating class java.lang.reflect.Constructor
09-06 11:22:15.442 W/System.err( 2702): at android.view.LayoutInflater.createView(LayoutInflater.java:512)
09-06 11:22:15.442 W/System.err( 2702): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
09-06 11:22:15.442 W/System.err( 2702): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
09-06 11:22:15.442 W/System.err( 2702): at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
09-06 11:22:15.442 W/System.err( 2702): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:701)
09-06 11:22:15.442 W/System.err( 2702): at android.view.LayoutInflater.rInflate(LayoutInflater.java:613)
09-06 11:22:15.442 W/System.err( 2702): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
09-06 11:22:15.442 W/System.err( 2702): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-06 11:22:15.442 W/System.err( 2702): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
09-06 11:22:15.442 W/System.err( 2702): at com.drclabs.android.wootchecker.MainActivity.onCreate(MainActivity.java:203)
09-06 11:22:15.442 W/System.err( 2702): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
09-06 11:22:15.442 W/System.err( 2702): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
09-06 11:22:15.442 W/System.err( 2702): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
09-06 11:22:15.442 W/System.err( 2702): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
09-06 11:22:15.442 W/System.err( 2702): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
09-06 11:22:15.442 W/System.err( 2702): at android.os.Handler.dispatchMessage(Handler.java:99)
09-06 11:22:15.442 W/System.err( 2702): at android.os.Looper.loop(Looper.java:123)
09-06 11:22:15.442 W/System.err( 2702): at android.app.ActivityThread.main(ActivityThread.java:3948)
09-06 11:22:15.442 W/System.err( 2702): at java.lang.reflect.Method.invokeNative(Native Method)
09-06 11:22:15.447 W/System.err( 2702): at java.lang.reflect.Method.invoke(Method.java:521)
09-06 11:22:15.447 W/System.err( 2702): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
09-06 11:22:15.447 W/System.err( 2702): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-06 11:22:15.447 W/System.err( 2702): at dalvik.system.NativeStart.main(Native Method)
09-06 11:22:15.447 W/System.err( 2702): Caused by: java.lang.reflect.InvocationTargetException
09-06 11:22:15.447 W/System.err( 2702): at android.widget.ImageView.&lt;init&gt;(ImageView.java:103)
09-06 11:22:15.447 W/System.err( 2702): at java.lang.reflect.Constructor.constructNative(Native Method)
09-06 11:22:15.447 W/System.err( 2702): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
09-06 11:22:15.452 W/System.err( 2702): at android.view.LayoutInflater.createView(LayoutInflater.java:499)
09-06 11:22:15.452 W/System.err( 2702): ... 22 more
09-06 11:22:15.452 W/System.err( 2702): Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f020004 a=-1 r=0x7f020004}
09-06 11:22:15.457 W/System.err( 2702): at android.content.res.Resources.loadDrawable(Resources.java:1609)
09-06 11:22:15.457 W/System.err( 2702): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
09-06 11:22:15.457 W/System.err( 2702): at android.widget.ImageView.&lt;init&gt;(ImageView.java:113)
09-06 11:22:15.457 W/System.err( 2702): ... 26 more
</code></pre>

<p>The relevant line in my Manifest:</p>

<pre><code>&lt;uses-sdk android:targetSdkVersion="8" android:minSdkVersion="3"/&gt;
</code></pre>

<p>The resource in question is a small PNG image located at res/drawable-hdpi/red_heart.png .
I want to add support for some of the new features in 2.2 if the user's device supports them, but I can't do so if I can't compile against the 2.2 SDK without breaking the app for my 1.5 users.</p>

<p>Does anyone have any idea how to work around this problem? Do I need to do something different with the way I'm storing or referencing my image resources in my layout files? </p>
