title: Why getStringSet method of sharedpreferences is not working?
body: <p>In my android app, i am using this line of code:</p>
  
  <pre><code>SharedPreferences myPrefs = getSharedPreferences("myPrefs", MODE_PRIVATE);
  Set&lt;String&gt; set = myPrefs.getStringSet("list", new HashSet&lt;String&gt;());
  </code></pre>
  
  <p>but i am getting following error:</p>
  
  <blockquote>
    <p>The method getStringSet(String, HashSet) is undefined for the
    type       SharedPreferences</p>
  </blockquote>
  
  <p>Why am i getting this error? Thanks in advance.</p>