Using targetSdkVersion

by Peter Eastman » Sun, 27 Jun 2010 03:13:58 GMT

Sponsored Links
 I'm stuck on a problem that I'm sure has a very simple answer, but I
haven't been able to figure it out.

I have a program that should work on Android 1.5, but when it's run on
newer devices with higher resolution screens, it should support the
full resolution and not emulate a lower resolution screen.  As far as
I can tell from the documentation, this should be simple.  I just

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

The problem is that if I tell Eclipse to compile for 1.5, it refuses
to accept this.  It reports an error (targetSdkVersion is an unknown
tag) and refuses to compile or run.  If I tell it to compile for 1.6
it works fine, of course.  But if I then try to install on a 1.5 AVD,
the program immediately crashes with a java.lang.VerifyError.  I'm
clearly missing something simple.  How do I get it to compile an apk
that works under 1.5, but still includes the targetSdkVersion tag?



Using targetSdkVersion

by YuviDroid » Sun, 27 Jun 2010 04:02:27 GMT

 The VerifyError occurs when you are using (or only 'importing') stuff that
is only in the newer API.
In this case I think you should use reflection to use the new APIs
methods/classes in Android > 1.6.


Sponsored Links

Using targetSdkVersion

by Peter Eastman » Sun, 27 Jun 2010 04:13:04 GMT

 You're right, my fault.  Because I had Eclipse set to 1.6, I missed
the fact that I was calling an API that didn't exist in 1.5.




Other Threads

1. hwo to test call?

Hi everyone
After the emulator start up, I send a call to the emulator by ddms.
But the phone does not have any notification.
In Logcat it says:

09-15 09:44:30.019: INFO/CallNotifier(683): CallNotifier: rejecting
incoming call: device isn't provisioned

how can I do? Can somebody help me?



2. making sdcard folder private to the app

Hello All,

I want to make a sdcard folder private to my application same the way
we have /data/data/<app> directory. and prevent the access of that
folder from other apps.

How could I achieve this in android?


3. Soft keyboard in Fullscreen/extract mode

4. Change Tab Background <selector>

5. How to debug crash on rotate

6. Still no paid apps in Android Market for Belgium

7. Solution suggestions