Nic wrote: > We are upgrading our application to add 2.0 support. I have read > http://developer.android.com/guide/appendix/api-levels.html and the > older blog post > http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html. > I want to avoid using reflection if possible. > > I have found that if I set my minSdkVersion="3" in the application > manifest but in my build path in eclipse point to the Adroid 2.0 jar > file I can compile with direct calls to 2.0 code (with the relevant > code to ensure they are not invoked on <2.0 devices).
Have you tested this code on a 1.5 emulator? If it attempts to load a class that refers to missing APIs -- even if the code paths would not execute those references -- you will fail on a VerifyError. > What are other people > using for multi-targeting different API levels with the same package? I recommend reflection. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

