Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SYSTEM_UI_FLAG_LOW_PROFILE cannot be resolved or is not a field for google threadsample

I have import the threadsample code from https://developer.android.com/training/multiple-threads/index.html, but I got errors after I import it.

They are : SYSTEM_UI_FLAG_LOW_PROFILE cannot be resolved or is not a field SYSTEM_UI_FLAG_HIDE_NAVIGATION cannot be resolved or is not a field

The project minSdkVersion=11 and targetSdkVersion=17, and I have already setup the support.v4 with it.

Does anyone have the same problem? How to fix it?

Thanks in advance. Screen capture

like image 863
Calvin Chan Avatar asked Dec 21 '22 05:12

Calvin Chan


1 Answers

That is a mistake SYSTEM_UI_FLAG_LOW_PROFILE is included in API >= 14 and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION is included in API >= 16
So you need minSdk=14. See the document at http://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_LOW_PROFILE. Need to change the project build target to Android 4.0 to get rid of the errors.

like image 158
Hoan Nguyen Avatar answered Dec 28 '22 05:12

Hoan Nguyen