I am running:
- OS X v10.8.4
- Eclipse 3.7.2
- Java 1.6
- Android minSdkVersion 17
- Android targetSdkVersion 17
But no dice. The compiler recognizes plain old AbstractMap
declarations, but has no clue about AbstractMap.SimpleEntry
or AbstractMap.SimpleImmutableEntry
:
However, via command line (javac 1.6.0_51
) the following does build and run:
import java.util.AbstractMap;
public class Test {
public static void main (String args[]) {
AbstractMap.SimpleImmutableEntry<String, String> entry =
new AbstractMap.SimpleImmutableEntry("key", "value");
System.out.println(entry.getKey());
System.out.println(entry.getValue());
}
}
Also, Android Studio (I/O Preview) recognizes AbstractMap.SimpleImmutableEntry
.
I have Build -> Clean'd, restarted Eclipse, rebooted the Mac. So something is wrong in my Eclipse setup. Help!