2

The latest version of AdMob SDK (the only one available to download) requires target=android-14 in the project's properties. This doesn't prevent one from running the app on lower versions of the platform (provided they are compatible with minSdkVersion), but Eclipse "Run" menu filters out all devices (virtual and real) with platform version less then target. Typical scenario

  • minSdkVersion set to Android 2.1 (API 7)
  • target set to ICS (API 14), otherwise you won't be able to compile the project because there are errors in the manifest, due to new values for configChanges (see this question)

You can run the app on any device >= Eclair only with the command line, because Eclipse filters out any device < 14. This makes it difficult to test on emulators. I use latest version of ADT (r19) and the Eclipse plugin (18.0)

Community
  • 1
  • 1
Raffaele
  • 20,627
  • 6
  • 47
  • 86

1 Answers1

1

Does it really filter them out, or is there just a red X next to them? You can still click on those devices to run the app. It's annoying that Eclipse complains about your emulator/device being lower than the target version.

FYI, the SDK requires a minimum of target=android-13 to support the screenSize|smallestScreenSize configChanges.

Eric Leichtenschlag
  • 8,881
  • 1
  • 28
  • 28
  • 1
    They are filtered out. The red X appears when I switch `target` back to some value, then the Eclipse plugin incostistently shows that icon. But when I restart Eclipse (or something gets recompiled) the devices are not available. You are right about the configChanges, but if you don't define them in the manifest Admob complains at runtime – Raffaele Apr 21 '12 at 09:27
  • Yes, AdMob requires `` in order to run, and as mentioned in my answer, the last two config changes require `target=android-13` or higher in project.properties. Of course, in the manifest you can change your `minSdkVersion` and `targetSdkVersion` to be whatever you want. The red X for all devices where it's version is lower than the project.properties version. Devices lower than the minSdkVersion won't run the app. – Eric Leichtenschlag Apr 23 '12 at 18:22
  • In the past I've issues where Eclipse just doesn't recognize an emulator that I have running. When that happened I ran adb kill-server (and adb start-server if necessary), and then Eclipse picked up the running emulator. – Eric Leichtenschlag Apr 23 '12 at 18:24
  • If you manually choose the device, then all compatible devices appear (along with the red "X", but this doesn't matter), but it doesn't work with automatic run. I thing AdMob could have done better with this, since most of the devices still run 2.2 – Raffaele Apr 23 '12 at 21:07
  • Good point, I forgot to mention that I was running the manual option. – Eric Leichtenschlag Apr 23 '12 at 23:57