the application has stopped unexpectedly

M

monomicha

Neues Mitglied
0
Hallo,
bin seit heute hier im Forum und habe gestern angefangen mich ein bisschen in das Buch "Android" von Arno Becker einzulesen. Bin also ganz am Anfang und mache erste Versuche mit dem Staumelder-App. Allerdings habe ich jetzt am Anfang gleich ein Problem. Ich habe das Programm so wie im Buch übernommen bzw. kleine Fehler vom Buch ausgemerzt und wollte es starten. Nun kommt die Fehlermeldung "The application Einsteigerbeispiel (process de.androidbuch.staumelder) has stopped unexpectedly. Please try again".
Woran kann das nun liegen?

Ich danke euch für eure Hilfe.

Hier der Code:

Code:
package de.androidbuch.staumelder;

    import android.app.Activity;
    import android.os.Bundle;
    import android.widget.ArrayAdapter;
    import android.widget.Spinner;

    
public class StaumeldungErfassen extends Activity {
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
        Spinner s = (Spinner) findViewById(R.id.stauUrsache);
        ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
                    this, R.array.stauUrsachen,
                    android.R.layout.simple_spinner_item);
        adapter.setDropDownViewResource(
                android.R.layout.simple_spinner_dropdown_item);
                s.setAdapter(adapter);
}
}
main.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/
apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<RadioGroup android:id="@+id/position"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RadioButton android:id="@+id/stauAnfang"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stauanfang" />
<RadioButton android:id="@+id/stauEnde"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Stauende" />
</RadioGroup>
<Spinner android:id="@+id/stauUrsache"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true" />
</LinearLayout>
arrays.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <array name="stauUrsachen">
        <item>Unfall</item>
        <item>Baustelle</item>
        <item>Gaffer</item>
        <item>Überlastung</item>
        <item>Sonstige</item>
    </array>
</resources>
strings.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello World, StaumeldungErfassen!</string>
    <string name="app_name">Einsteigerbeispiel</string>
</resources>
 
Die Fehlermeldung ist absolut nichtssagend. Mach dich mal mit adb lolcat vertraut, damit siehst du besser, woran es liegt

Sent from my Nexus One
 
Danke für die Antwort. Im Grunde war mir klar, dass diese Aufforderung kommt. Habe das schon versucht mit Logcat nur weiß ich nicht genau ob ich das richtig mache. Habe einfach die "adb.exe" im Ordner "tools" geöffnet!? Allerdings habe ich da keine Hinweise zu meinem Programm gefunden.
 
Was heißt einfach geöffnet? Ordentlich über die Eingabeaufforderung, oder einfach doppelklick? ;)

Richtiger Weg:
Eingabeaufforderung öffnen (Start-->Eingabeaufforderung)
mit cd "Ordner" in den Ordner tools öffnen.
Am schnellsten geht das, indem du den Ordner im Explorer öffnest, oben linksklick auf die Addresse, dann Strg-C oder rechtsklick-->kopieren
Dann in der Eingabeaufforderung "cd " eingeben, rechtsklick-->Einfügen, Enter drücken.
Dann sollte vor dem > der ganze Ordnerpfad stehen. Jetzt entweder adb logcat eintippen, Enter drücken, oder ddms eingebn, Enter drücken.
dein Gerät sollte vorher mit dem Computer verbunden sein, bzw der Emulator laufen. Dann den Fehler verursachen. Meistens steht dann in der 1. oder 2. Zeile der Fehlerinfo sowas wie "permission" oder so, dann weißt du gleich was los ist ;)
 
danke dir für deine Hilfe.

hab es jetzt mal "richtig" gemacht und adb logcat gibt folgendes aus(ich hoffe es ist nicht verboten einen so langen Text zu posten. Ich kann eben nicht viel mit anfangen):

1.apk@classes.dex
W/Searchables( 65): No global search activity found
D/AndroidRuntime( 266): Shutting down VM
D/dalvikvm( 266): Debugger has detached; object registry had 1 entries
I/AndroidRuntime( 266): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 280):
D/AndroidRuntime( 280): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 280): CheckJNI is ON
D/AndroidRuntime( 280): --- registering native functions ---
I/ActivityManager( 65): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=de.androidbuch.st
aumelder/.StaumeldungErfassen }
D/AndroidRuntime( 280): Shutting down VM
D/dalvikvm( 280): Debugger has detached; object registry had 1 entries
I/ActivityManager( 65): Start proc de.androidbuch.staumelder for activity de.a
ndroidbuch.staumelder/.StaumeldungErfassen: pid=287 uid=10032 gids={1015}
I/AndroidRuntime( 280): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 287): Shutting down VM
W/dalvikvm( 287): threadid=1: thread exiting with uncaught exception (group=0x4
001d800)
E/AndroidRuntime( 287): FATAL EXCEPTION: main
E/AndroidRuntime( 287): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{de.androidbuch.staumelder/de.androidbuch.staumelder.StaumeldungErfas
sen}: java.lang.RuntimeException: Binary XML file line #2: You must supply a lay
out_width attribute.
E/AndroidRuntime( 287): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2663)
E/AndroidRuntime( 287): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2679)
E/AndroidRuntime( 287): at android.app.ActivityThread.access$2300(Activi
tyThread.java:125)
E/AndroidRuntime( 287): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:2033)
E/AndroidRuntime( 287): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 287): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 287): at android.app.ActivityThread.main(ActivityThrea
d.java:4627)
E/AndroidRuntime( 287): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 287): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 287): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 287): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:626)
E/AndroidRuntime( 287): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 287): Caused by: java.lang.RuntimeException: Binary XML file
line #2: You must supply a layout_width attribute.
E/AndroidRuntime( 287): at android.content.res.TypedArray.getLayoutDimen
sion(TypedArray.java:491)
E/AndroidRuntime( 287): at android.view.ViewGroup$LayoutParams.setBaseAt
tributes(ViewGroup.java:3592)
E/AndroidRuntime( 287): at android.view.ViewGroup$MarginLayoutParams.<in
it>(ViewGroup.java:3672)
E/AndroidRuntime( 287): at android.widget.FrameLayout$LayoutParams.<init
>(FrameLayout.java:452)
E/AndroidRuntime( 287): at android.widget.FrameLayout.generateLayoutPara
ms(FrameLayout.java:418)
E/AndroidRuntime( 287): at android.widget.FrameLayout.generateLayoutPara
ms(FrameLayout.java:48)
E/AndroidRuntime( 287): at android.view.LayoutInflater.inflate(LayoutInf
later.java:395)
E/AndroidRuntime( 287): at android.view.LayoutInflater.inflate(LayoutInf
later.java:320)
E/AndroidRuntime( 287): at android.view.LayoutInflater.inflate(LayoutInf
later.java:276)
E/AndroidRuntime( 287): at com.android.internal.policy.impl.PhoneWindow.
setContentView(PhoneWindow.java:198)
E/AndroidRuntime( 287): at android.app.Activity.setContentView(Activity.
java:1647)
E/AndroidRuntime( 287): at de.androidbuch.staumelder.StaumeldungErfassen
.onCreate(StaumeldungErfassen.java:12)
E/AndroidRuntime( 287): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 287): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2627)
E/AndroidRuntime( 287): ... 11 more
W/ActivityManager( 65): Force finishing activity de.androidbuch.staumelder/.
StaumeldungErfassen
W/ActivityManager( 65): Activity pause timeout for HistoryRecord{43f558b8 de.a
ndroidbuch.staumelder/.StaumeldungErfassen}
D/dalvikvm( 190): GC_EXPLICIT freed 111 objects / 4760 bytes in 87ms
W/ActivityManager( 65): Activity destroy timeout for HistoryRecord{43f558b8 de
.androidbuch.staumelder/.StaumeldungErfassen}
D/dalvikvm( 239): GC_EXPLICIT freed 708 objects / 53048 bytes in 158ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
I/Process ( 287): Sending signal. PID: 287 SIG: 9
I/ActivityManager( 65): Process de.androidbuch.staumelder (pid 287) has died.
W/InputManagerService( 65): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@43dee888
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/dalvikvm( 65): GC_FOR_MALLOC freed 8777 objects / 446392 bytes in 161ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/dalvikvm( 111): GC_FOR_MALLOC freed 10010 objects / 476672 bytes in 184ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/dalvikvm( 65): GC_FOR_MALLOC freed 12261 objects / 536432 bytes in 148ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/dalvikvm( 65): GC_FOR_MALLOC freed 11989 objects / 532424 bytes in 181ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/dalvikvm( 65): GC_FOR_MALLOC freed 12549 objects / 547568 bytes in 229ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/dalvikvm( 65): GC_FOR_MALLOC freed 12210 objects / 551920 bytes in 185ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/AndroidRuntime( 297):
D/AndroidRuntime( 297): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 297): CheckJNI is ON
D/AndroidRuntime( 297): --- registering native functions ---
D/AndroidRuntime( 297): Shutting down VM
D/dalvikvm( 297): Debugger has detached; object registry had 1 entries
D/AndroidRuntime( 305):
D/AndroidRuntime( 305): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 305): CheckJNI is ON
D/AndroidRuntime( 305): --- registering native functions ---
I/ActivityManager( 65): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=de.androidbuch.st
aumelder/.StaumeldungErfassen }
D/AndroidRuntime( 305): Shutting down VM
D/dalvikvm( 305): Debugger has detached; object registry had 1 entries
I/AndroidRuntime( 305): NOTE: attach of thread 'Binder Thread #3' failed
W/ActivityManager( 65): Activity pause timeout for HistoryRecord{43f1d660 com.
android.launcher/com.android.launcher2.Launcher}
I/ActivityManager( 65): Start proc de.androidbuch.staumelder for activity de.a
ndroidbuch.staumelder/.StaumeldungErfassen: pid=312 uid=10032 gids={1015}
D/AndroidRuntime( 312): Shutting down VM
W/dalvikvm( 312): threadid=1: thread exiting with uncaught exception (group=0x4
001d800)
E/AndroidRuntime( 312): FATAL EXCEPTION: main
E/AndroidRuntime( 312): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{de.androidbuch.staumelder/de.androidbuch.staumelder.StaumeldungErfas
sen}: java.lang.RuntimeException: Binary XML file line #2: You must supply a lay
out_width attribute.
E/AndroidRuntime( 312): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2663)
E/AndroidRuntime( 312): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2679)
E/AndroidRuntime( 312): at android.app.ActivityThread.access$2300(Activi
tyThread.java:125)
E/AndroidRuntime( 312): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:2033)
E/AndroidRuntime( 312): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 312): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 312): at android.app.ActivityThread.main(ActivityThrea
d.java:4627)
E/AndroidRuntime( 312): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 312): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 312): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 312): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:626)
E/AndroidRuntime( 312): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 312): Caused by: java.lang.RuntimeException: Binary XML file
line #2: You must supply a layout_width attribute.
E/AndroidRuntime( 312): at android.content.res.TypedArray.getLayoutDimen
sion(TypedArray.java:491)
E/AndroidRuntime( 312): at android.view.ViewGroup$LayoutParams.setBaseAt
tributes(ViewGroup.java:3592)
E/AndroidRuntime( 312): at android.view.ViewGroup$MarginLayoutParams.<in
it>(ViewGroup.java:3672)
E/AndroidRuntime( 312): at android.widget.FrameLayout$LayoutParams.<init
>(FrameLayout.java:452)
E/AndroidRuntime( 312): at android.widget.FrameLayout.generateLayoutPara
ms(FrameLayout.java:418)
E/AndroidRuntime( 312): at android.widget.FrameLayout.generateLayoutPara
ms(FrameLayout.java:48)
E/AndroidRuntime( 312): at android.view.LayoutInflater.inflate(LayoutInf
later.java:395)
E/AndroidRuntime( 312): at android.view.LayoutInflater.inflate(LayoutInf
later.java:320)
E/AndroidRuntime( 312): at android.view.LayoutInflater.inflate(LayoutInf
later.java:276)
E/AndroidRuntime( 312): at com.android.internal.policy.impl.PhoneWindow.
setContentView(PhoneWindow.java:198)
E/AndroidRuntime( 312): at android.app.Activity.setContentView(Activity.
java:1647)
E/AndroidRuntime( 312): at de.androidbuch.staumelder.StaumeldungErfassen
.onCreate(StaumeldungErfassen.java:12)
E/AndroidRuntime( 312): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 312): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2627)
E/AndroidRuntime( 312): ... 11 more
W/ActivityManager( 65): Force finishing activity de.androidbuch.staumelder/.
StaumeldungErfassen
W/ActivityManager( 65): Activity pause timeout for HistoryRecord{43de5d80 de.a
ndroidbuch.staumelder/.StaumeldungErfassen}
W/ActivityManager( 65): Activity destroy timeout for HistoryRecord{43de5d80 de
.androidbuch.staumelder/.StaumeldungErfassen}
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
 
monomicha schrieb:
danke dir für deine Hilfe.

hab es jetzt mal "richtig" gemacht und adb logcat gibt folgendes aus(ich hoffe es ist nicht verboten einen so langen Text zu posten. Ich kann eben nicht viel mit anfangen):

1.apk@classes.dex
W/Searchables( 65): No global search activity found
D/AndroidRuntime( 266): Shutting down VM
D/dalvikvm( 266): Debugger has detached; object registry had 1 entries
I/AndroidRuntime( 266): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 280):
D/AndroidRuntime( 280): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 280): CheckJNI is ON
D/AndroidRuntime( 280): --- registering native functions ---
I/ActivityManager( 65): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=de.androidbuch.st
aumelder/.StaumeldungErfassen }
D/AndroidRuntime( 280): Shutting down VM
D/dalvikvm( 280): Debugger has detached; object registry had 1 entries
I/ActivityManager( 65): Start proc de.androidbuch.staumelder for activity de.a
ndroidbuch.staumelder/.StaumeldungErfassen: pid=287 uid=10032 gids={1015}
I/AndroidRuntime( 280): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 287): Shutting down VM
W/dalvikvm( 287): threadid=1: thread exiting with uncaught exception (group=0x4
001d800)
E/AndroidRuntime( 287): FATAL EXCEPTION: main
E/AndroidRuntime( 287): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{de.androidbuch.staumelder/de.androidbuch.staumelder.StaumeldungErfas
sen}: java.lang.RuntimeException: Binary XML file line #2: You must supply a lay
out_width attribute.
E/AndroidRuntime( 287): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2663)
E/AndroidRuntime( 287): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2679)
E/AndroidRuntime( 287): at android.app.ActivityThread.access$2300(Activi
tyThread.java:125)
E/AndroidRuntime( 287): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:2033)
E/AndroidRuntime( 287): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 287): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 287): at android.app.ActivityThread.main(ActivityThrea
d.java:4627)
E/AndroidRuntime( 287): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 287): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 287): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 287): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:626)
E/AndroidRuntime( 287): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 287): Caused by: java.lang.RuntimeException: Binary XML file
line #2: You must supply a layout_width attribute.
E/AndroidRuntime( 287): at android.content.res.TypedArray.getLayoutDimen
sion(TypedArray.java:491)
E/AndroidRuntime( 287): at android.view.ViewGroup$LayoutParams.setBaseAt
tributes(ViewGroup.java:3592)
E/AndroidRuntime( 287): at android.view.ViewGroup$MarginLayoutParams.<in
it>(ViewGroup.java:3672)
E/AndroidRuntime( 287): at android.widget.FrameLayout$LayoutParams.<init
>(FrameLayout.java:452)
E/AndroidRuntime( 287): at android.widget.FrameLayout.generateLayoutPara
ms(FrameLayout.java:418)
E/AndroidRuntime( 287): at android.widget.FrameLayout.generateLayoutPara
ms(FrameLayout.java:48)
E/AndroidRuntime( 287): at android.view.LayoutInflater.inflate(LayoutInf
later.java:395)
E/AndroidRuntime( 287): at android.view.LayoutInflater.inflate(LayoutInf
later.java:320)
E/AndroidRuntime( 287): at android.view.LayoutInflater.inflate(LayoutInf
later.java:276)
E/AndroidRuntime( 287): at com.android.internal.policy.impl.PhoneWindow.
setContentView(PhoneWindow.java:198)
E/AndroidRuntime( 287): at android.app.Activity.setContentView(Activity.
java:1647)
E/AndroidRuntime( 287): at de.androidbuch.staumelder.StaumeldungErfassen
.onCreate(StaumeldungErfassen.java:12)
E/AndroidRuntime( 287): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 287): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2627)
E/AndroidRuntime( 287): ... 11 more
W/ActivityManager( 65): Force finishing activity de.androidbuch.staumelder/.
StaumeldungErfassen
W/ActivityManager( 65): Activity pause timeout for HistoryRecord{43f558b8 de.a
ndroidbuch.staumelder/.StaumeldungErfassen}
D/dalvikvm( 190): GC_EXPLICIT freed 111 objects / 4760 bytes in 87ms
W/ActivityManager( 65): Activity destroy timeout for HistoryRecord{43f558b8 de
.androidbuch.staumelder/.StaumeldungErfassen}
D/dalvikvm( 239): GC_EXPLICIT freed 708 objects / 53048 bytes in 158ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
I/Process ( 287): Sending signal. PID: 287 SIG: 9
I/ActivityManager( 65): Process de.androidbuch.staumelder (pid 287) has died.
W/InputManagerService( 65): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@43dee888
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/dalvikvm( 65): GC_FOR_MALLOC freed 8777 objects / 446392 bytes in 161ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/dalvikvm( 111): GC_FOR_MALLOC freed 10010 objects / 476672 bytes in 184ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/dalvikvm( 65): GC_FOR_MALLOC freed 12261 objects / 536432 bytes in 148ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/dalvikvm( 65): GC_FOR_MALLOC freed 11989 objects / 532424 bytes in 181ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/dalvikvm( 65): GC_FOR_MALLOC freed 12549 objects / 547568 bytes in 229ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/dalvikvm( 65): GC_FOR_MALLOC freed 12210 objects / 551920 bytes in 185ms
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
D/ThrottleService( 65): onPollAlarm - roaming =false, read =0, written =0, new
total =0
D/AndroidRuntime( 297):
D/AndroidRuntime( 297): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 297): CheckJNI is ON
D/AndroidRuntime( 297): --- registering native functions ---
D/AndroidRuntime( 297): Shutting down VM
D/dalvikvm( 297): Debugger has detached; object registry had 1 entries
D/AndroidRuntime( 305):
D/AndroidRuntime( 305): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 305): CheckJNI is ON
D/AndroidRuntime( 305): --- registering native functions ---
I/ActivityManager( 65): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=de.androidbuch.st
aumelder/.StaumeldungErfassen }
D/AndroidRuntime( 305): Shutting down VM
D/dalvikvm( 305): Debugger has detached; object registry had 1 entries
I/AndroidRuntime( 305): NOTE: attach of thread 'Binder Thread #3' failed
W/ActivityManager( 65): Activity pause timeout for HistoryRecord{43f1d660 com.
android.launcher/com.android.launcher2.Launcher}
I/ActivityManager( 65): Start proc de.androidbuch.staumelder for activity de.a
ndroidbuch.staumelder/.StaumeldungErfassen: pid=312 uid=10032 gids={1015}
D/AndroidRuntime( 312): Shutting down VM
W/dalvikvm( 312): threadid=1: thread exiting with uncaught exception (group=0x4
001d800)
E/AndroidRuntime( 312): FATAL EXCEPTION: main
E/AndroidRuntime( 312): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{de.androidbuch.staumelder/de.androidbuch.staumelder.StaumeldungErfas
sen}: java.lang.RuntimeException: Binary XML file line #2: You must supply a lay
out_width attribute.
E/AndroidRuntime( 312): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2663)
E/AndroidRuntime( 312): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2679)
E/AndroidRuntime( 312): at android.app.ActivityThread.access$2300(Activi
tyThread.java:125)
E/AndroidRuntime( 312): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:2033)
E/AndroidRuntime( 312): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 312): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 312): at android.app.ActivityThread.main(ActivityThrea
d.java:4627)
E/AndroidRuntime( 312): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 312): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 312): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 312): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:626)
E/AndroidRuntime( 312): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 312): Caused by: java.lang.RuntimeException: Binary XML file
line #2: You must supply a layout_width attribute.
E/AndroidRuntime( 312): at android.content.res.TypedArray.getLayoutDimen
sion(TypedArray.java:491)
E/AndroidRuntime( 312): at android.view.ViewGroup$LayoutParams.setBaseAt
tributes(ViewGroup.java:3592)
E/AndroidRuntime( 312): at android.view.ViewGroup$MarginLayoutParams.<in
it>(ViewGroup.java:3672)
E/AndroidRuntime( 312): at android.widget.FrameLayout$LayoutParams.<init
>(FrameLayout.java:452)
E/AndroidRuntime( 312): at android.widget.FrameLayout.generateLayoutPara
ms(FrameLayout.java:418)
E/AndroidRuntime( 312): at android.widget.FrameLayout.generateLayoutPara
ms(FrameLayout.java:48)
E/AndroidRuntime( 312): at android.view.LayoutInflater.inflate(LayoutInf
later.java:395)
E/AndroidRuntime( 312): at android.view.LayoutInflater.inflate(LayoutInf
later.java:320)
E/AndroidRuntime( 312): at android.view.LayoutInflater.inflate(LayoutInf
later.java:276)
E/AndroidRuntime( 312): at com.android.internal.policy.impl.PhoneWindow.
setContentView(PhoneWindow.java:198)
E/AndroidRuntime( 312): at android.app.Activity.setContentView(Activity.
java:1647)
E/AndroidRuntime( 312): at de.androidbuch.staumelder.StaumeldungErfassen
.onCreate(StaumeldungErfassen.java:12)
E/AndroidRuntime( 312): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 312): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2627)
E/AndroidRuntime( 312): ... 11 more
W/ActivityManager( 65): Force finishing activity de.androidbuch.staumelder/.
StaumeldungErfassen
W/ActivityManager( 65): Activity pause timeout for HistoryRecord{43de5d80 de.a
ndroidbuch.staumelder/.StaumeldungErfassen}
W/ActivityManager( 65): Activity destroy timeout for HistoryRecord{43de5d80 de
.androidbuch.staumelder/.StaumeldungErfassen}
D/SntpClient( 65): request time failed: java.net.SocketException: Address fami
ly not supported by protocol

Meine Android-Kenntnisse sind in dem Punkt auch recht oberflächlich, aber für mich sieht es so aus, als ob ein layout_width Attribut in einer XML fehlt.
 
Also wie Du in meinen *.xml-Dateien sehen kannst, fehlt dort kein layout_width attribut.
Außerdem bezieht sich das ja nur auf die main.xml oder?

Danke dir.
 
monomicha schrieb:
Also wie Du in meinen *.xml-Dateien sehen kannst, fehlt dort kein layout_width attribut.
Außerdem bezieht sich das ja nur auf die main.xml oder?

Danke dir.

Das ist das, was die Exception besagt. Weiteres muss dir jemand sagen, der sich damit auskennt.
 
Das Problem liegt in der Zeile
Code:
<LinearLayout xmlns:android="http://schemas.android.com/
apk/res/android"
ganz oben in main.xml
Du hast einen Zeilenumbruch im String "http..." und das geht nicht. Der Fehler mit dem layout_width kommt wohl daher, dass das Attribut nach dem String folgt.

Also so funktioniert es:
Code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 
sebastian schrieb:
Das Problem liegt in der Zeile
Code:
<LinearLayout xmlns:android="http://schemas.android.com/
apk/res/android"
ganz oben in main.xml
Du hast einen Zeilenumbruch im String "http..." und das geht nicht. Der Fehler mit dem layout_width kommt wohl daher, dass das Attribut nach dem String folgt.

Also so funktioniert es:
Code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

Hey Jungs, ihr seit die Besten! Jetzt funktionierts. Lag tatsächlich an dem Zeilenumbruch.

Danke euch vielmal.
 
Hey ich bin ebenfalls neu in diesem Forum und ich hab gestern mit der Android app programmation angefangen.

Ich hab genau das gleiche Problem wie monomicha. Ich hab den adb logcat auch schon ausgeführt doch ich werde aus dem Text nicht klar :(

Weitere Informationen: Ich teste meine App in dem Android Emulator 2.0 und schreibe die App in eclipse.

I/ActivityManager( 59): Process com.example.BMIrechnen (pid 226) has died.
W/UsageStats( 59): Unexpected resume of com.android.launcher while already res
umed in com.example.BMIrechnen
D/AndroidRuntime( 241):
D/AndroidRuntime( 241): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 241): CheckJNI is ON
W/ActivityManager( 59): Launch timeout has expired, giving up wake lock!
W/InputManagerService( 59): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@44cc0628
D/AndroidRuntime( 241): --- registering native functions ---
D/ddm-heap( 241): Got feature list request
I/ActivityManager( 59): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.BMIre
chnen/.main }
D/AndroidRuntime( 241): Shutting down VM
D/dalvikvm( 241): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 241): DestroyJavaVM shutting VM down
D/dalvikvm( 241): HeapWorker thread shutting down
D/dalvikvm( 241): HeapWorker thread has shut down
D/jdwp ( 241): JDWP shutting down net...
I/dalvikvm( 241): Debugger has detached; object registry had 1 entries
D/dalvikvm( 241): VM cleaning up
I/ActivityManager( 59): Start proc com.example.BMIrechnen for activity com.exa
mple.BMIrechnen/.main: pid=248 uid=10027 gids={1015}
E/AndroidRuntime( 241): ERROR: thread attach failed
D/dalvikvm( 241): LinearAlloc 0x0 used 636716 of 5242880 (12%)
D/ddm-heap( 248): Got feature list request
D/AndroidRuntime( 248): Shutting down VM
W/dalvikvm( 248): threadid=3: thread exiting with uncaught exception (group=0x4
001b188)
E/AndroidRuntime( 248): Uncaught handler: thread main exiting due to uncaught e
xception
E/AndroidRuntime( 248): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{com.example.BMIrechnen/com.example.BMIrechnen.main}: java.lang.Class
CastException: android.widget.TextView
E/AndroidRuntime( 248): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2454)
E/AndroidRuntime( 248): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2470)
E/AndroidRuntime( 248): at android.app.ActivityThread.access$2200(Activi
tyThread.java:119)
E/AndroidRuntime( 248): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1821)
E/AndroidRuntime( 248): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 248): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 248): at android.app.ActivityThread.main(ActivityThrea
d.java:4310)
E/AndroidRuntime( 248): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 248): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 248): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 248): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime( 248): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 248): Caused by: java.lang.ClassCastException: android.widget
.TextView
E/AndroidRuntime( 248): at com.example.BMIrechnen.main.initControls(main
.java:40)
E/AndroidRuntime( 248): at com.example.BMIrechnen.main.onCreate(main.jav
a:31)
E/AndroidRuntime( 248): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 248): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2417)
E/AndroidRuntime( 248): ... 11 more
I/Process ( 59): Sending signal. PID: 248 SIG: 3
I/dalvikvm( 248): threadid=7: reacting to signal 3
I/dalvikvm( 248): Wrote stack trace to '/data/anr/traces.txt'
W/ActivityManager( 59): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 59): Activity idle timeout for HistoryRecord{44c6d380 com.e
xample.BMIrechnen/.main}
D/dalvikvm( 107): GC freed 4220 objects / 234592 bytes in 112ms
I/Process ( 248): Sending signal. PID: 248 SIG: 9
I/ActivityManager( 59): Process com.example.BMIrechnen (pid 248) has died.
W/UsageStats( 59): Unexpected resume of com.android.launcher while already res
umed in com.example.BMIrechnen
E/gralloc ( 59): [unregister] handle 0x382730 still locked (state=40000001)
W/InputManagerService( 59): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@44ce8c58
D/dalvikvm( 107): GC freed 524 objects / 28368 bytes in 185ms
W/KeyCharacterMap( 107): No keyboard for id 0
W/KeyCharacterMap( 107): Using default keymap: /system/usr/keychars/qwerty.kcm.
bin
I/ActivityManager( 59): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.alarm
clock/.AlarmClock }
D/dalvikvm( 169): GC freed 1340 objects / 113472 bytes in 137ms
I/ActivityManager( 59): Displayed activity com.android.alarmclock/.AlarmClock:
2038 ms (total 209020 ms)
I/ARMAssembler( 59): generated scanline__00000077:03545404_00000A04_00000000 [
29 ipp] (51 ins) at [0x4568f8:0x4569c4] in 795004 ns
W/KeyCharacterMap( 169): No keyboard for id 0
W/KeyCharacterMap( 169): Using default keymap: /system/usr/keychars/qwerty.kcm.
bin
W/InputManagerService( 59): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@44c860b0
D/dalvikvm( 107): GC freed 102 objects / 4456 bytes in 142ms
D/AndroidRuntime( 256):
D/AndroidRuntime( 256): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 256): CheckJNI is ON
D/AndroidRuntime( 256): --- registering native functions ---
D/ddm-heap( 256): Got feature list request
D/AndroidRuntime( 256): Shutting down VM
D/dalvikvm( 256): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 256): DestroyJavaVM shutting VM down
D/dalvikvm( 256): HeapWorker thread shutting down
D/dalvikvm( 256): HeapWorker thread has shut down
D/jdwp ( 256): JDWP shutting down net...
I/dalvikvm( 256): Debugger has detached; object registry had 1 entries
E/AndroidRuntime( 256): ERROR: thread attach failed
D/dalvikvm( 256): VM cleaning up
D/dalvikvm( 256): LinearAlloc 0x0 used 626876 of 5242880 (11%)
D/AndroidRuntime( 264):
D/AndroidRuntime( 264): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 264): CheckJNI is ON
D/AndroidRuntime( 264): --- registering native functions ---
D/ddm-heap( 264): Got feature list request
I/ActivityManager( 59): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.BMIre
chnen/.main }
D/AndroidRuntime( 264): Shutting down VM
D/dalvikvm( 264): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 264): DestroyJavaVM shutting VM down
D/dalvikvm( 264): HeapWorker thread shutting down
D/dalvikvm( 264): HeapWorker thread has shut down
D/jdwp ( 264): JDWP shutting down net...
I/dalvikvm( 264): Debugger has detached; object registry had 1 entries
D/dalvikvm( 264): VM cleaning up
E/AndroidRuntime( 264): ERROR: thread attach failed
D/dalvikvm( 264): LinearAlloc 0x0 used 636716 of 5242880 (12%)
I/ActivityManager( 59): Start proc com.example.BMIrechnen for activity com.exa
mple.BMIrechnen/.main: pid=271 uid=10027 gids={1015}
D/ddm-heap( 271): Got feature list request
D/AndroidRuntime( 271): Shutting down VM
W/dalvikvm( 271): threadid=3: thread exiting with uncaught exception (group=0x4
001b188)
E/AndroidRuntime( 271): Uncaught handler: thread main exiting due to uncaught e
xception
E/AndroidRuntime( 271): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{com.example.BMIrechnen/com.example.BMIrechnen.main}: java.lang.Class
CastException: android.widget.TextView
E/AndroidRuntime( 271): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2454)
E/AndroidRuntime( 271): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2470)
E/AndroidRuntime( 271): at android.app.ActivityThread.access$2200(Activi
tyThread.java:119)
E/AndroidRuntime( 271): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1821)
E/AndroidRuntime( 271): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 271): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 271): at android.app.ActivityThread.main(ActivityThrea
d.java:4310)
E/AndroidRuntime( 271): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 271): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 271): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 271): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime( 271): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 271): Caused by: java.lang.ClassCastException: android.widget
.TextView
E/AndroidRuntime( 271): at com.example.BMIrechnen.main.initControls(main
.java:40)
E/AndroidRuntime( 271): at com.example.BMIrechnen.main.onCreate(main.jav
a:31)
E/AndroidRuntime( 271): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 271): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2417)
E/AndroidRuntime( 271): ... 11 more
I/Process ( 59): Sending signal. PID: 271 SIG: 3
I/dalvikvm( 271): threadid=7: reacting to signal 3
I/dalvikvm( 271): Wrote stack trace to '/data/anr/traces.txt'
W/ActivityManager( 59): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 59): Activity idle timeout for HistoryRecord{44c87070 com.e
xample.BMIrechnen/.main}
D/dalvikvm( 169): GC freed 1363 objects / 83568 bytes in 118ms
I/jdwp ( 59): Ignoring second debugger -- accepting and dropping
I/jdwp ( 101): Ignoring second debugger -- accepting and dropping
I/jdwp ( 103): Ignoring second debugger -- accepting and dropping
I/jdwp ( 107): Ignoring second debugger -- accepting and dropping
I/jdwp ( 125): Ignoring second debugger -- accepting and dropping
I/jdwp ( 141): Ignoring second debugger -- accepting and dropping
I/jdwp ( 169): Ignoring second debugger -- accepting and dropping
I/jdwp ( 179): Ignoring second debugger -- accepting and dropping
I/jdwp ( 189): Ignoring second debugger -- accepting and dropping
I/jdwp ( 213): Ignoring second debugger -- accepting and dropping
I/jdwp ( 271): Ignoring second debugger -- accepting and dropping
I/Process ( 271): Sending signal. PID: 271 SIG: 9
I/ActivityManager( 59): Process com.example.BMIrechnen (pid 271) has died.
W/UsageStats( 59): Unexpected resume of com.android.alarmclock while already r
esumed in com.example.BMIrechnen
W/InputManagerService( 59): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@44ca77f0
W/KeyCharacterMap( 169): No keyboard for id 0
W/KeyCharacterMap( 169): Using default keymap: /system/usr/keychars/qwerty.kcm.
bin
W/InputManagerService( 59): Starting input on non-focused client com.android.i
nternal.view.IInputMethodClient$Stub$Proxy@44cd8520 (uid=10014 pid=169)
D/AndroidRuntime( 290):
D/AndroidRuntime( 290): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 290): CheckJNI is ON
D/AndroidRuntime( 290): --- registering native functions ---
D/ddm-heap( 290): Got feature list request
D/AndroidRuntime( 290): Shutting down VM
D/dalvikvm( 290): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 290): DestroyJavaVM shutting VM down
D/dalvikvm( 290): HeapWorker thread shutting down
D/dalvikvm( 290): HeapWorker thread has shut down
D/jdwp ( 290): JDWP shutting down net...
I/dalvikvm( 290): Debugger has detached; object registry had 1 entries
E/AndroidRuntime( 290): ERROR: thread attach failed
D/dalvikvm( 290): VM cleaning up
D/dalvikvm( 290): LinearAlloc 0x0 used 626876 of 5242880 (11%)
D/AndroidRuntime( 298):
D/AndroidRuntime( 298): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 298): CheckJNI is ON
D/AndroidRuntime( 298): --- registering native functions ---
D/ddm-heap( 298): Got feature list request
I/ActivityManager( 59): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.BMIre
chnen/.main }
D/AndroidRuntime( 298): Shutting down VM
D/dalvikvm( 298): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 298): DestroyJavaVM shutting VM down
D/dalvikvm( 298): HeapWorker thread shutting down
D/dalvikvm( 298): HeapWorker thread has shut down
D/jdwp ( 298): JDWP shutting down net...
I/dalvikvm( 298): Debugger has detached; object registry had 1 entries
D/dalvikvm( 298): VM cleaning up
E/AndroidRuntime( 298): ERROR: thread attach failed
D/dalvikvm( 298): LinearAlloc 0x0 used 636716 of 5242880 (12%)
I/ActivityManager( 59): Start proc com.example.BMIrechnen for activity com.exa
mple.BMIrechnen/.main: pid=305 uid=10027 gids={1015}
D/ddm-heap( 305): Got feature list request
D/AndroidRuntime( 305): Shutting down VM
W/dalvikvm( 305): threadid=3: thread exiting with uncaught exception (group=0x4
001b188)
E/AndroidRuntime( 305): Uncaught handler: thread main exiting due to uncaught e
xception
E/AndroidRuntime( 305): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{com.example.BMIrechnen/com.example.BMIrechnen.main}: java.lang.Class
CastException: android.widget.TextView
E/AndroidRuntime( 305): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2454)
E/AndroidRuntime( 305): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2470)
E/AndroidRuntime( 305): at android.app.ActivityThread.access$2200(Activi
tyThread.java:119)
E/AndroidRuntime( 305): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1821)
E/AndroidRuntime( 305): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime( 305): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 305): at android.app.ActivityThread.main(ActivityThrea
d.java:4310)
E/AndroidRuntime( 305): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 305): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime( 305): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 305): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:618)
E/AndroidRuntime( 305): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 305): Caused by: java.lang.ClassCastException: android.widget
.TextView
E/AndroidRuntime( 305): at com.example.BMIrechnen.main.initControls(main
.java:40)
E/AndroidRuntime( 305): at com.example.BMIrechnen.main.onCreate(main.jav
a:31)
E/AndroidRuntime( 305): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1047)
E/AndroidRuntime( 305): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2417)
E/AndroidRuntime( 305): ... 11 more
I/Process ( 59): Sending signal. PID: 305 SIG: 3
I/dalvikvm( 305): threadid=7: reacting to signal 3
I/dalvikvm( 305): Wrote stack trace to '/data/anr/traces.txt'
W/ActivityManager( 59): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 59): Activity idle timeout for HistoryRecord{44d206d8 com.e
xample.BMIrechnen/.main}
D/dalvikvm( 107): GC freed 94 objects / 4232 bytes in 132ms
I/Process ( 305): Sending signal. PID: 305 SIG: 9
I/ActivityManager( 59): Process com.example.BMIrechnen (pid 305) has died.
W/UsageStats( 59): Unexpected resume of com.android.launcher while already res
umed in com.example.BMIrechnen
W/InputManagerService( 59): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@44d3a4a0



MFG Chris92
 
E/AndroidRuntime( 248): java.lang.RuntimeException: Unable to start activity Co
mponentInfo{com.example.BMIrechnen/com.example.BMIrechnen.main}: java.lang.Class
CastException: android.widget.TextView

Du castest irgendwo etwas auf eine TextView was keine ist.

Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
Und beim posten von LogCats reicht es die roten Zeilen zu posten.
 
Die roten Zeilen sind übrigens nur rot wenn du logcat aus Eclipse oder über ddms (auch einfach in der Eingabeaufforderung eintippen wie adb logcat) aufrufst, nicht über adb logcat.
Am praktischsten finde ich persönlich den Weg über Eclipse, oben auf "Window"-->"Open Perspective"-->"DDMS", dann dort in der Liste doppelklick auf dein Gerät (wenn es denn angeschlossen ist) bzw auf den Emulator, und dann noch irgendwo den knopf für die Logcat suchen.
 

Ähnliche Themen

F
Antworten
1
Aufrufe
2.233
jogimuc
J
K
Antworten
1
Aufrufe
1.093
markus.tullius
markus.tullius
Zurück
Oben Unten