Reputation: 719
I was going through this sample package which Google has provided with it's sdk. I tried changing the api level to 7 and observed that there were many unresolved errors in the project.
I'm listing a few here:
Any idea how to get rid of these errors? Basically I'm targeting android devices 2.x and later. Does using actionbarsherlock is another alternative? I read here on some post that action bar compatibility package works on 2.x android devices as well.
Upvotes: 5
Views: 8497
Reputation: 741
Right click on your project in the Package Manager, then highlight the Android node in the Properties dialog that opens. You will see a list of Project Build Targets. Select the API level 14, Android 4.0 build target. This will get rid of the error. Unfortunately, that also means it won't show up on your emulated devices that are using Android 2.3.3. You'll have to create a new one in the AVD that supports 4.0.
Upvotes: 13
Reputation: 917
You shouldn't change the api version. The manifest declares min-sdk-version as 4, which means it will work on 2.x devices. Try loading it on the emulator, using api version 14 to compile.
Upvotes: 1