java - AbstractMap.SimpleImmutableEntry cannot be resolved to a type -


i running:

  • os x v10.8.4
  • eclipse 3.7.2
  • java 1.6
  • android minsdkversion 17
  • android targetsdkversion 17

but no dice. compiler recognizes plain old abstractmap declarations, has no clue abstractmap.simpleentry or abstractmap.simpleimmutableentry:

bad compiler

however, via command line (javac 1.6.0_51) following build , 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 mac. wrong in eclipse setup. help!

are sure building level 17 of sdk? abstractmap.simpleimmutableentry added in api level 9. exact class caught me out build api level 8.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -