MainActivity.java String[] name = getResources().getStringArray(R.array.name); String.xml <string name="petr">Петр</string> <string name="vasiliy">Василий</string> <string-array name="name"> <item>@string/petr</item> <item>@string/vasiliy</item> </string-array>
Cannot connect an array from String.xml. Throws Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources ()' on a null object reference.
How can it be null ??? The array is there.