У меня есть этот код: < /p>
TypedArray mAllowedCountries = application.getResources().obtainTypedArray(R.array.allowed_countries);
for (int index = 0; index < mAllowedCountries.length(); index++) {
if(mAllowedCountries.getString(index) != null) {
if (mAllowedCountries.getString(index).toUpperCase().equals(addressComponentCountry.short_name.toUpperCase())) {
supported = true;
break;
}
}
}
< /code>
Я получаю Android Studio Lint < /em> предупреждение о < /p>
method inpocation 'touppercase' может произвести
java.lang.nullPointerExcept Исправьте это, чтобы избавиться от предупреждения lint ?
Подробнее здесь: https://stackoverflow.com/questions/493 ... typedarray
Почему Android Studio Lint предупреждает при использовании TypedArray? ⇐ Android
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение