tags:

views:

16

answers:

1

Hello Everybody,

My device Firmware version is 1.6 and whenever I run my application on Device I got an error :

ERROR/AndroidRuntime(834): java.lang.VerifyError: dalvikvm(834): VFY: unable to resolve static field 966 (CONTENT_URI) in Landroid/provider/ContactsContract$CommonDataKinds$Phone;

I think I am getting this error because of "android.provider.ContactsContract" class to build my application? because it's API level is 5 .

So can any body help me to resolve the issue and how can I run a single build on 1.5 and 1.6 and 2.0 - above sdk ?

ThanksInAdvance

+1  A: 

You will need to use reflection or conditional class loading to support multiple API levels like this.

CommonsWare
The "backward compatibility" article from the Android developer blog has been collected with several others in the developer docs. See http://developer.android.com/resources/articles/backward-compatibility.html .
fadden