0

I'm getting error in my ArrayAdapter<>

listView.setAdapter(new ArrayAdapter<>(this,android.R.layout.simple_list_item_1,name1));

Error:(24, 46) error: diamond operator is not supported in -source 1.6 (use -source 7 or higher to enable diamond operator)

Then I updated my java version to

java version "1.7.0_67" 

But still I'm getting the same error. OS I'm using ubuntu 14.04.

Suresh Atta
  • 120,458
  • 37
  • 198
  • 307
Sameera
  • 1
  • 1
  • 3

1 Answers1

5

Now with Android Studio(I use v1.1), You can change your language level easily by clicking File->Project Structure, and in the open window follow the settings:

enter image description here

Allen
  • 6,745
  • 5
  • 41
  • 59