Integer.toString(tmp) --- 10年6月11日,周五, Jason Hensler <jasonehens...@gmail.com> 写道:
发件人: Jason Hensler <jasonehens...@gmail.com> 主题: [android-developers] Int to string 收件人: android-developers@googlegroups.com 日期: 2010年6月11日,周五,上午11:58 It seems like in my code that my app is crashing because it is a int and not a string. This is my code: I am assuming that tmp has a value.. For debugging what is the best way to check varibles for values? If i remove the line with the red text everything runs fine. EditText text; text = (EditText) findViewById(R.id.EditText01); SharedPreferences myPrefs = this.getSharedPreferences("muter", MODE_WORLD_READABLE); SharedPreferences.Editor prefsEditor = myPrefs.edit(); int tmp = myPrefs.getInt("state", 0); text.setText(tmp); Thanks in advance! Jason -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en