1

how can I test backwards compatibility in android emulator? I have a testapp with SDK 15. Now if I switch the compiler version to SDK 7 (for running it on Android2.1 emulation), Eclipse complains about all used imports contained only >SDK7. Of course.

But in my code I care about the critical code by if(Build.VERSION.SDK_INT > 11)..., so this should not be a problem when running on older devices. Anyhow, of course eclipse still keeps complaining.

So, how can I make these backwards testing?

membersound
  • 81,582
  • 193
  • 585
  • 1,120
  • possible duplicate of http://stackoverflow.com/questions/7637144/android-requires-compiler-compliance-level-5-0-or-6-0-found-1-7-instead-plea –  May 18 '12 at 17:27
  • You don't use Support Package? http://developer.android.com/sdk/compatibility-library.html – Michał Klimczak May 18 '12 at 17:28
  • No dublicate, this is not about the @override issue in any case! TY very much for the hint with v4 supp package. I did not know about this. If you add this again as an answer I can accept yours. – membersound May 19 '12 at 09:08

1 Answers1

1

In AndroidManifest.xml file, change the Min sdk version attribute to the sdk version which you want your app to run on, then eclipse wont complain....

eg:

   < uses-sdk android:minSdkVersion="10" />
Kumar Vivek Mitra
  • 33,294
  • 6
  • 48
  • 75