1. Nimm jetzt an unserem Uhans - 3. ADVENT - Gewinnspiel teil - Alle Informationen findest Du hier!

Fehlermeldung.. kann mir da einer weiterhelfen?

Dieses Thema im Forum "Android App Entwicklung" wurde erstellt von badkeks, 18.03.2011.

  1. badkeks, 18.03.2011 #1
    badkeks

    badkeks Threadstarter Neuer Benutzer

    Beiträge:
    13
    Erhaltene Danke:
    0
    Registriert seit:
    18.03.2011
    Hallo Leute,

    und zwar hab ich eine einfache App geschrieben welche sich allerdings nicht starten lässt... Es erscheint stets die Nachricht:

    the application has stopped unexpectedly
    Bin dann mal hergegangen und hab ddms laufen lassen...

    Der Log sieht wie folgt aus:

    Code:
    03-18 22:49:32.511: INFO/ActivityManager(51): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=de.verleihsystem/.LoanForm }
    03-18 22:49:32.741: INFO/ActivityManager(51): Start proc de.verleihsystem for activity de.verleihsystem/.LoanForm: pid=326 uid=10003 gids={}
    03-18 22:49:33.031: INFO/jdwp(326): received file descriptor 10 from ADB
    03-18 22:49:33.101: INFO/jdwp(326): Ignoring second debugger -- accepting and dropping
    03-18 22:49:33.151: DEBUG/ddm-heap(326): Got feature list request
    03-18 22:49:33.561: WARN/ResourceType(326): getEntry failing because entryIndex 1 is beyond type entryCount 1
    03-18 22:49:33.561: WARN/ResourceType(326): Failure getting entry for 0x7f030001 (t=2 e=1) in package 0: 0x80000001
    03-18 22:49:33.571: DEBUG/AndroidRuntime(326): Shutting down VM
    03-18 22:49:33.571: WARN/dalvikvm(326): threadid=3: thread exiting with uncaught exception (group=0x4001aa28)
    03-18 22:49:33.571: ERROR/AndroidRuntime(326): Uncaught handler: thread main exiting due to uncaught exception
    03-18 22:49:33.591: ERROR/AndroidRuntime(326): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.verleihsystem/de.verleihsystem.LoanForm}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030001
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.app.ActivityThread.access$2100(ActivityThread.java:116)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.os.Handler.dispatchMessage(Handler.java:99)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.os.Looper.loop(Looper.java:123)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.app.ActivityThread.main(ActivityThread.java:4203)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at java.lang.reflect.Method.invokeNative(Native Method)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at java.lang.reflect.Method.invoke(Method.java:521)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at dalvik.system.NativeStart.main(Native Method)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030001
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.content.res.Resources.getValue(Resources.java:896)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.content.res.Resources.loadXmlResourceParser(Resources.java:1869)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.content.res.Resources.getLayout(Resources.java:735)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:313)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.app.Activity.setContentView(Activity.java:1620)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at de.verleihsystem.LoanForm.onCreate(LoanForm.java:23)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
    03-18 22:49:33.591: ERROR/AndroidRuntime(326):     ... 11 more
    03-18 22:49:33.601: INFO/Process(51): Sending signal. PID: 326 SIG: 3
    03-18 22:49:33.601: INFO/dalvikvm(326): threadid=7: reacting to signal 3
    03-18 22:49:33.601: ERROR/dalvikvm(326): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
    03-18 22:49:37.151: INFO/Process(326): Sending signal. PID: 326 SIG: 9
    03-18 22:49:37.171: INFO/ActivityManager(51): Process de.verleihsystem (pid 326) has died.
    03-18 22:49:37.271: WARN/UsageStats(51): Unexpected resume of com.android.launcher while already resumed in de.verleihsystem
    03-18 22:49:37.441: WARN/InputManagerService(51): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4391e0d0
    
    Sieht jemand von euch Profis woran es liegt?
    Oder könnte Ihr ohne Quellcode nichts sagen?

    Viele Dank!
     
  2. v Ralle v, 19.03.2011 #2
    v Ralle v

    v Ralle v Android-Lexikon

    Beiträge:
    913
    Erhaltene Danke:
    199
    Registriert seit:
    27.08.2010
    Steht doch eindeutig da, was das Problem ist :)

    Es konnte eine Ressource nicht gefunden werden. Warum das der Fall ist, kann ich dir nicht sagen ;) Vielleicht liegt das daran, dass du z.B. die Ressource suchst mit findById, aber das Layout wurde nicht noch geparsed über den Inflater.
     
    badkeks bedankt sich.
  3. badkeks, 19.03.2011 #3
    badkeks

    badkeks Threadstarter Neuer Benutzer

    Beiträge:
    13
    Erhaltene Danke:
    0
    Registriert seit:
    18.03.2011
    Vielen Dank - Allerdings hab ich jetzt scheinbar ein Problem mit einem fehlenden layout_width ... Aber die sind doch alle da?

    Fehlermeldung:

    Code:
     03-18 23:30:57.551: DEBUG/ddm-heap(468): Got feature list request
      03-18 23:30:57.951: DEBUG/AndroidRuntime(468): Shutting down VM
      03-18 23:30:57.951: WARN/dalvikvm(468): threadid=3: thread exiting with uncaught exception (group=0x4001aa28)
      03-18 23:30:57.951: ERROR/AndroidRuntime(468): Uncaught handler: thread main exiting due to uncaught exception
      03-18 23:30:57.971: ERROR/AndroidRuntime(468): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.verleihsystem/de.verleihsystem.LoanForm}: java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.app.ActivityThread.access$2100(ActivityThread.java:116)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.os.Handler.dispatchMessage(Handler.java:99)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.os.Looper.loop(Looper.java:123)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.app.ActivityThread.main(ActivityThread.java:4203)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at java.lang.reflect.Method.invokeNative(Native Method)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at java.lang.reflect.Method.invoke(Method.java:521)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at dalvik.system.NativeStart.main(Native Method)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468): Caused by: java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:438)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:3433)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:3513)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.widget.FrameLayout$LayoutParams.<init>(FrameLayout.java:452)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:418)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:48)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:313)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.app.Activity.setContentView(Activity.java:1620)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at de.verleihsystem.LoanForm.onCreate(LoanForm.java:23)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
      03-18 23:30:57.971: ERROR/AndroidRuntime(468):     ... 11 more
      03-18 23:30:57.981: INFO/Process(51): Sending signal. PID: 468 SIG: 3
      03-18 23:30:57.991: INFO/dalvikvm(468): threadid=7: reacting to signal 3
      03-18 23:30:57.991: ERROR/dalvikvm(468): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
      
    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:padding="10sp"
       android:text="@string/tx_what" />
    <Spinner android:id="@+id/sp_what"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:drawSelectorOnTop="true"
        android:entries="@array/sp_what_entries" />
     <TextView
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:padding="10sp"
       android:text="@string/tx_whom" />
     <EditText android:id="@+id/edt_whom"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content" />
     <TextView
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:padding="10sp"
       android:text="@string/tx_amount" />
     <EditText android:id="@+id/edt_amount"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:text="0.0"
       android:inputType="numberDecimal" />
     <Button android:id="@+id/sf_save"
       android:text="@string/tx_save"
       android:onClick="onSaveLoan"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"/>
    </LinearLayout>
      
    Vielen Dank für jede Art von Hilfe =)
     
  4. badkeks, 19.03.2011 #4
    badkeks

    badkeks Threadstarter Neuer Benutzer

    Beiträge:
    13
    Erhaltene Danke:
    0
    Registriert seit:
    18.03.2011
    Oh man... Es lag an dem beschissenen Leerzeichen innerhalb der Layout Definition...

    <LinearLayout xmlns:android=" http://schemas.android.com/apk/res/android"


    Kann dann jetzt geschlossen werden...
    Fehler sind einfach nicht mein Ding.. und das schon garnicht um die Uhrzeit... :O
     

Diese Seite empfehlen