2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

設定を作ったとき onPreferenceChange でエラーが出る。

Posted at

問題

SettingActivity.java
private static Preference.OnPreferenceChangeListener sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() {
		@Override
ここがエラー	public boolean onPreferenceChange(Preference preference, Object value) {
   //・・・・・・・いろいろ
}
};

onPreferenceChange(Preference preference, Object value) が スーパークラスをオーバーライドできない 的なエラーで先に進めない。

原因のファイルの特定

新規プロジェクトを作成して、原因調査を行ったところ

プロジェクト
+- .setting
  +- org.eclipse.jdt.core.prefs これ

org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5

ここが違った。

修正

の [1.5]と書いてある物を [1.6]としたら直った。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?