M
MatthiasKramer
Ambitioniertes Mitglied
- 3
Hallo, ich sitze hier schon seid 2 Stunden an der Logcat und ich finde den Fehler einfach nicht, da steht so viel, das kann man einfach nicht verstehen.. o.0
LogCat
Activity
Ich hoffe irgendjemand versteht was von der LogCat und/oder kann mir vielleicht Tipps zur Fehlerbehandlung geben
Gruß
LogCat
Code:
10-08 07:36:09.010: D/dalvikvm(224): newInstance failed: p0 i0 [0 a1
10-08 07:36:09.130: D/AndroidRuntime(224): Shutting down VM
10-08 07:36:09.130: W/dalvikvm(224): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
10-08 07:36:09.169: E/AndroidRuntime(224): Uncaught handler: thread main exiting due to uncaught exception
10-08 07:36:09.320: E/AndroidRuntime(224): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.projekt.irgendeinprojekt/de.projekt.irgendeinprojekt.SsActivity}: java.lang.InstantiationException: de.projekt.irgendeinprojekt.SsActivity
10-08 07:36:09.320: E/AndroidRuntime(224): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
10-08 07:36:09.320: E/AndroidRuntime(224): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
10-08 07:36:09.320: E/AndroidRuntime(224): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
10-08 07:36:09.320: E/AndroidRuntime(224): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
10-08 07:36:09.320: E/AndroidRuntime(224): at android.os.Handler.dispatchMessage(Handler.java:99)
10-08 07:36:09.320: E/AndroidRuntime(224): at android.os.Looper.loop(Looper.java:123)
10-08 07:36:09.320: E/AndroidRuntime(224): at android.app.ActivityThread.main(ActivityThread.java:4363)
10-08 07:36:09.320: E/AndroidRuntime(224): at java.lang.reflect.Method.invokeNative(Native Method)
10-08 07:36:09.320: E/AndroidRuntime(224): at java.lang.reflect.Method.invoke(Method.java:521)
10-08 07:36:09.320: E/AndroidRuntime(224): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
10-08 07:36:09.320: E/AndroidRuntime(224): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
10-08 07:36:09.320: E/AndroidRuntime(224): at dalvik.system.NativeStart.main(Native Method)
10-08 07:36:09.320: E/AndroidRuntime(224): Caused by: java.lang.InstantiationException: de.projekt.irgendeinprojekt.SsActivity
10-08 07:36:09.320: E/AndroidRuntime(224): at java.lang.Class.newInstanceImpl(Native Method)
10-08 07:36:09.320: E/AndroidRuntime(224): at java.lang.Class.newInstance(Class.java:1479)
10-08 07:36:09.320: E/AndroidRuntime(224): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
10-08 07:36:09.320: E/AndroidRuntime(224): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
10-08 07:36:09.320: E/AndroidRuntime(224): ... 11 more
10-08 07:36:09.509: I/dalvikvm(224): threadid=7: reacting to signal 3
10-08 07:36:09.599: I/dalvikvm(224): Wrote stack trace to '/data/anr/traces.txt'
10-08 07:36:13.392: I/Process(224): Sending signal. PID: 224 SIG: 9
Activity
Code:
package de.projekt.irgendeinprojekt;
import java.util.Locale;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
public abstract class SsActivity extends Activity implements OnInitListener, OnClickListener {
public TextToSpeech tts;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ss);
tts = new TextToSpeech(this,this);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.ss, menu);
return true;
}
public void OCback (View view) {
Intent intent = new Intent (this, MainmenuActivity.class);
startActivity(intent);
finish();
}
public void OCclose (View view) {
finish();
}
public void OCok(View view) {
EditText et = (EditText)findViewById(R.id.et_whatshouldisay);
String text = getText(R.id.et_whatshouldisay).toString();
if (text.length() == 0){
return;
}
tts.setLanguage(Locale.GERMAN);
Button button = (Button) findViewById(R.id.btn_ok);
button.setOnClickListener(this);
tts.speak(et.getText().toString(), TextToSpeech.QUEUE_FLUSH, null);
}
}
Ich hoffe irgendjemand versteht was von der LogCat und/oder kann mir vielleicht Tipps zur Fehlerbehandlung geben
Gruß