任何想法都是什么错误,您还希望我上传什么来解决此问题。
java.lang.RuntimeException: Unable to resume activity {com.wolframite.manos.crack_the_code/com.wolframite.manos.crack_the_code.single_player}: android.content.res.Resources$NotFoundException: String resource ID #0x1
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3493)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3533)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6342)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x1
at android.content.res.Resources.getText(Resources.java:347)
at android.content.res.MiuiResources.getText(MiuiResources.java:97)
at android.widget.TextView.setText(TextView.java:4557)
at com.wolframite.manos.crack_the_code.single_player.onResume(single_player.java:736)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1270)
at android.app.Activity.performResume(Activity.java:6960)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3470)
... 8 more
答案 0 :(得分:1)
您不能在setText(String)
方法中设置整数值,
尝试使用..(在“活动”的Integer
中)将String
转换为onResume()
setText(Integer.toString(intValue))