2

我正在使用SharedPreferences获取“年龄”但遇到以下错误...如何处理?谢谢!

SharedPreferences settings3 = Profile.this.getSharedPreferences("MyApp",0);
age = settings3.getInt("age",25);
textview_age_input.setText(""+age);  //LINE 122

日志猫:

08-24 01:23:59.588: E/AndroidRuntime(15117): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0xa0
08-24 01:23:59.588: E/AndroidRuntime(15117):    at android.content.res.Resources.getText(Resources.java:242)
08-24 01:23:59.588: E/AndroidRuntime(15117):    at android.widget.TextView.setText(TextView.java:3806)
08-24 01:23:59.588: E/AndroidRuntime(15117):    at com.abc.abc.Profile.onCreate(Profile.java:122)
08-24 01:23:59.588: E/AndroidRuntime(15117):    at android.app.Activity.performCreate(Activity.java:5206)
4

0 回答 0