我的应用程序在两周前开始运行。除了添加两个按钮以帮助用户返回主屏幕之外,没有更改任何内容。但是,当我现在运行我的应用程序时,我收到以下错误:
02-03 14:01:28.206 12937-12937/com.example.cherryjp.buttonapp E/AndroidRuntime: FATAL EXCEPTION: main
02-03 14:01:28.206 12937-12937/com.example.cherryjp.buttonapp
E/AndroidRuntime: Process: com.example.cherryjp.buttonapp, PID: 12937
02-03 14:01:28.206 12937-12937/com.example.cherryjp.buttonapp
E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.cherryjp.buttonapp/com.example.cherryjp.buttonapp.ImmediateGraph}: android.content.res.Resources$NotFoundException: String resource ID #0x4
02-03 14:01:28.206 12937-12937/com.example.cherryjp.buttonapp
E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
这是应用程序崩溃时调用的内容:
public void showGraph(Entry entry){
Intent immediateGraphIntent = new Intent(this, ImmediateGraph.class);
final int result = 1;
//Just getEntry on next intent instead of storing extras.
immediateGraphIntent.putExtra("ENTRY_ID", entry.getId());
//immediateGraphIntent.putExtra("PASSTIME", timeArray);
//immediateGraphIntent.putExtra("PASSFORCE", forceArray);
startActivity(immediateGraphIntent);
}