I’m interested in running the Android Support library demo projects for the v4 library.
Using the Android SDK manager I’ve installed the Eclipse plugins, and APIs from 2.2 to 4.0.1. There are several issues involved, and the sample project as provided is far from running on my configuration, as downloaded.
To reproduce this error:
-
Install SDK and Eclipse Juno
-
Import the sample v4 compatibility project using File –> New –> New Project and choose “from existing code”, targeting, for example, the
Support4Demosfolder in<Android-sdk-path>/extras/android/support
- Open the file
AccessibilityManagerSupportActivity.java. The following errors appear.

- Open
res/values-v11/styles.xml. The following errors occur.

How do I get rid of these errors? I’d also like to understand why they are appearing so I can fix them in the future.
Thanks!
Clean solution is to:
I can’t really answer you on the why this problem happens, but I’m guessing the Android team doesn’t supply the Android support library, because it’s changing all the time, so not to get stuck on some older version, they want us to supply it on our own.
If errors still persists or new errors come up, right-click the project again and choose “Android tool” -> “Fix project properties”
Update: In conjuction to my answer, the way to remove the rest of the errors is to import the project another way than you did.
Now add the Android support librarys as described above.
You will get errors still however. To fix these, do the following:
Now you won’t be able to run the sample project on devices lower than Android 3.0.
The reason is because of some dependencies on some themes and settings, that wasn’t added before Android 3.0 apparently.
It doesn’t make sense why Google did this, but they did. You could try to remove the SDK +11 (Android 3.0) specific dependencies, but it will take some time – there are more errors than you actually see – especially in the XML files.