views:

198

answers:

1

Hey,

I'm a bit lost right now, what I'm trying to do: build a 1.5 compatible app that should also run on 2.0/2.1 devices like the Nexus. The problem is that supports-screen doesn't work the way it's supposed to with 1.5 target set in eclipse.

Did I miss something? Basically, I just want my app not to scale anything, I'll handle that ( anyScale = true )

Thanks in advance!

+4  A: 

As you've noted the <support-screens> element of <manifest> was indroduced at API Level 4, which is Android 1.6, and this means it doesn't work for an Android 1.5 application.

However, you can get this to work for an application that does run on 1.5.

If you specify targetSdkVersion as well as minSdkVersion your application will start to work correctly on all platforms.

So have an entry in your manifest like this:

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>

This is covered in the Android API Levels page in the Android Developer documentation.

Dave Webb
thanks for the answer. I'm a bit confused though, because it compiles just fine, but setting the build target in eclipse using adt to 1.6 ( which is required for the support-screen to work, I can't get it to run on 1.5 devices. Am I missing something?
moritz
Depends what you mean by "can't get it to run". I have the same configuration for my Application. If I use the Run option from within Eclipse it insists on launching a 1.6 emulator. However, if I manually install the `.apk` file from the `bin` folder of the project on to a 1.5 emulator using `adb install` it works fine.
Dave Webb
alright, then i was just subject to my own confusion. thanks a lot, have a great weekend!
moritz