Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ApiDemos 3.0/3.1 won't build because of unresolved types

Tags:

java

android

I'm trying to build ApiDemos for API levels 11 (3.0) and 12 (3.1). I've updated to the latest version both tools (revision 11) and platform tools (revision 4). In addition, I have the compatibility package installed.

When I try to build the ApiDemos project I get thousands of errors, of which Eclipse shows 100 of the following:

ActionBar cannot be resolved to a type  ActionBarDisplayOptions.java    /ApiDemos3.1/src/com/example/android/apis/app   line 34 Java Problem

ActionMode cannot be resolved to a type Grid3.java  /ApiDemos3.1/src/com/example/android/apis/view  line 133    Java Problem

alertDialogIcon cannot be resolved or is not a field    AlertDialogSamples.java /ApiDemos3.1/src/com/example/android/apis/app   line 82 Java Problem

animator cannot be resolved or is not a field   FragmentHideShow.java   /ApiDemos3.1/src/com/example/android/apis/app   line 55 Java Problem

Animator cannot be resolved to a type   AnimationLoading.java   /ApiDemos3.1/src/com/example/android/apis/animation line 73 Java Problem

I need help getting the samples to build properly. Thanks.

like image 780
gnobal Avatar asked Dec 18 '25 16:12

gnobal


1 Answers

It appears that the compatibility jar file only contains support for Fragments and not classes like ActionBar which are only available in API11 and 12. Unless you build with API11 or 12 as your target, you will be unable to use these classes.

like image 177
NickT Avatar answered Dec 20 '25 06:12

NickT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!