为什么Android Studio不“接受”“getBoolean”?

时间:2015-07-19 15:42:21

标签: android boolean

它只是说:“无法解析符号”getBoolean“”

final String PREFS_NAME = "write";

SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);

if (settings.getBoolean("my_first_time", true)) {
    //the app is being launched for first time, do something
    Log.d("Comments", "First time");


    Intent intent = new Intent(this, firststart.class);


    settings.edit().putBoolean("my_first_time", false).commit();
}

0 个答案:

没有答案