You have to call setEntryValues() as well. Both arrays should have the same size. So simply add a line cityPref.setEntryValues(cities)
to your onCreate()
method and you should be fine.
By only calling setEntries()
both sizes are out of sync. Thus the Exception.