1

I've searched internet for that error and have not found right answer. I've got error saying "method call expected" on mPrefsKeys in bindPreferenceSummaryToValue(findPreference(mPrefsKeys(i)))

public final static String [] mPrefsKeys = new String[]{"username", "devicename"}
bindPreferenceSummaryToValue(findPreference(mPrefsKeys(i)))

public Preference findPreference(CharSequence key) {
    if (mPreferenceManager == null) {
        return null;
    }
    return mPreferenceManager.findPreference(key);
}

What that error means?

Alex Martian
  • 3,423
  • 7
  • 36
  • 71

1 Answers1

2

I spent significant effort to search for the answer what that error means.

Then somehow reading something (Java Method Call Expected) I was enlighted: array items should be referenced with [], not ().

Community
  • 1
  • 1
Alex Martian
  • 3,423
  • 7
  • 36
  • 71
  • 1
    anyone knows why the error is worded that way? why method expected whereas CharSequence is a parameter in findPreference? – Alex Martian Feb 05 '16 at 17:36