Search code examples
androideclipseandroid-emulatorandroid-sensors

Eclipse does not recognize an android API level 9 call even though I'm using API level 10


I'm trying to use Sensor.TYPE_LINEAR_ACCELERATION. Accrording to documentation, starting since level 9 (gingerbread) this API should be callable. However, eclipse is giving me syntax error, and thinks Sensor does not have access to TYPE_LINEAR_ACCELERATION. I have no problem calling Sensor.TYPE_ACCELEROMETER tho. My running configuration on eclipse shows that my target is android 2.3.3 or API level 10. Is there any other place that I need to check to whether the packages are imported from 2.3 and not older versions?
Thanks


Solution

  • Fixed it. Even though I was running the emulator with 2.3, I was building with 2.1. So I changed it so it now builds with 2.3.