@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()){
case R.id.upArrow:
upSound.start();
En_description.setText("\"Straight Ahead\"");
break;
case R.id.downArrow:
downSound.start();
En_description.setText("\"Down\"");
break;
case R.id.rightArrow:
rightSound.start();
En_description.setText("\"Right\"");
break;
case R.id.leftArrow:
leftSound.start();
En_description.setText("\"Left\"");
break;
default:
}
}
コードは単純です 矢印を押すとその方向を入力し、何らかの理由でサウンドを再生します 時々動作し、他の時には強制的に閉じる HELP ありがとうこれはログです
05-24 17:52:20.384: W/dalvikvm(343): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
05-24 17:52:20.394: E/AndroidRuntime(343): Uncaught handler: thread main exiting due to uncaught exception
05-24 17:52:20.404: E/AndroidRuntime(343): java.lang.NullPointerException
05-24 17:52:20.404: E/AndroidRuntime(343): at com.aboutera.learnArabic.Directions.onClick(Directions.java:77)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.view.View.performClick(View.java:2364)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.view.View.onTouchEvent(View.java:4179)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.view.View.dispatchTouchEvent(View.java:3709)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
05-24 17:52:20.404: E/AndroidRuntime(343): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
05-24 17:52:20.404: E/AndroidRuntime(343): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
05-24 17:52:20.404: E/AndroidRuntime(343): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.os.Handler.dispatchMessage(Handler.java:99)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.os.Looper.loop(Looper.java:123)
05-24 17:52:20.404: E/AndroidRuntime(343): at android.app.ActivityThread.main(ActivityThread.java:4363)
05-24 17:52:20.404: E/AndroidRuntime(343): at java.lang.reflect.Method.invokeNative(Native Method)
05-24 17:52:20.404: E/AndroidRuntime(343): at java.lang.reflect.Method.invoke(Method.java:521)
05-24 17:52:20.404: E/AndroidRuntime(343): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-24 17:52:20.404: E/AndroidRuntime(343): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-24 17:52:20.404: E/AndroidRuntime(343): at dalvik.system.NativeStart.main(Native Method)
05-24 17:52:20.414: I/dalvikvm(343): threadid=7: reacting to signal 3
05-24 17:52:20.414: E/dalvikvm(343): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
05-24 17:52:22.534: I/Process(343): Sending signal. PID: 343 SIG: 9