Android bei Animation Absturz

Diskutiere bei Animation Absturz im Mobile Geräte Forum; moinsen :lol::lol: also ich hab ne xml für die animation im ordner /res/anim die xml sieht so aus: <?xml version="1.0" encoding="UTF-8"?>...

  1. noobee
    noobee Mitglied
    moinsen :lol::lol:

    also ich hab ne xml für die animation im ordner /res/anim

    die xml sieht so aus:
    [XML]<?xml version="1.0" encoding="UTF-8"?>
    <set xmlns:android="http://schemas.android.com/apk/res/android">
    <alpha
    android:fromAlpha="0.0"
    android:toAlpha="1.0"
    android:interpolator="@android:anim/accelerate_interpolator"
    android:duration="800"
    android:repeatCount="0" />
    </set>[/XML]

    und es soll so eingeblendet werden:

    [XML]
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:eek:rientation="vertical"
    android:background="@drawable/back4"
    android:layoutAnimation="@anim/fadein" >[/XML]

    jedoch stürz das proggie immer ab ohne meldung
     
    Zuletzt von einem Moderator bearbeitet: 4. Juli 2012
  2. Vielleicht hilft dir dieser Kurs hier weiter (Klick!)
  3. schlingel
    schlingel Gesperrter Benutzer
    Das glaub ich dir nicht. Hast du schon mit Logcat die Ausgaben gechecked?
     
  4. noobee
    noobee Mitglied
    mhh, jetzt hab ich eclipse wieder geöffnet und da geht kein debuggen mehr. meldung:

    com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup
    Exception details are logged in Window > Show View > Error Log
    The following classes could not be found:
    - LinearLayout (Change to android.widget.LinearLayout, Fix Build Path, Edit XML)

    das steht da, seit dem ich in der xml folgendes eingefügt hatte:
    [XML]android:layoutAnimation="@anim/fadein" >[/XML]
     
  5. noobee
    noobee Mitglied
    der einzige fehler der da steht:

    unable to open log device '/dev/log/main': no such file or directory
     
  6. noobee
    noobee Mitglied
    hab mal die ausgabe von logcat gepostet

    Code (Text):
    07-05 23:39:10.569: E/SoundPool(71): error loading /system/media/audio/ui/Effect_Tick.ogg
    07-05 23:39:10.569: E/SoundPool(71): error loading /system/media/audio/ui/KeypressStandard.ogg
    07-05 23:39:10.569: E/SoundPool(71): error loading /system/media/audio/ui/KeypressSpacebar.ogg
    07-05 23:39:10.580: E/SoundPool(71): error loading /system/media/audio/ui/KeypressDelete.ogg
    07-05 23:39:10.580: E/SoundPool(71): error loading /system/media/audio/ui/KeypressReturn.ogg
    07-05 23:39:12.700: E/ThrottleService(71): Could not open GPS configuration file /etc/gps.conf
    07-05 23:39:12.780: E/ThrottleService(71): Error reading data file
    07-05 23:39:13.220: E/logwrapper(158): executing /system/bin/tc failed: No such file or directory
    07-05 23:39:13.290: E/logwrapper(159): executing /system/bin/tc failed: No such file or directory
    07-05 23:39:13.320: E/logwrapper(161): executing /system/bin/tc failed: No such file or directory
    07-05 23:39:16.610: E/logwrapper(171): executing /system/bin/tc failed: No such file or directory
    07-05 23:39:16.660: E/logwrapper(172): executing /system/bin/tc failed: No such file or directory
    07-05 23:39:16.680: E/logwrapper(174): executing /system/bin/tc failed: No such file or directory
    07-05 23:39:22.077: E/HierarchicalStateMachine(71): TetherMaster - unhandledMessage: msg.what=3
    07-05 23:39:22.137: E/HierarchicalStateMachine(71): TetherMaster - unhandledMessage: msg.what=3
    07-05 23:39:22.257: E/HierarchicalStateMachine(71): TetherMaster - unhandledMessage: msg.what=3
    07-05 23:39:32.766: E/MetadataRetrieverClient(34): failed to extract an album art
    07-05 23:40:41.697: E/ThrottleService(71): Error reading data file
    07-05 23:48:15.146: E/jdwp(215): Failed writing handshake bytes: Broken pipe (-1 of 14)
    07-05 23:48:15.166: E/jdwp(243): Failed writing handshake bytes: Broken pipe (-1 of 14)
    07-05 23:48:15.176: E/jdwp(254): Failed sending reply to debugger: Broken pipe
    07-05 23:48:15.176: E/jdwp(261): Failed sending reply to debugger: Broken pipe
    07-05 23:48:15.176: E/jdwp(291): Failed sending reply to debugger: Broken pipe
    07-05 23:49:41.296: E/JavaBinder(71): !!! FAILED BINDER TRANSACTION !!!
    07-05 23:49:43.906: E/jdwp(401): Failed sending reply to debugger: Broken pipe
    07-05 23:49:50.667: E/AndroidRuntime(401): FATAL EXCEPTION: main
    07-05 23:49:50.667: E/AndroidRuntime(401): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.icke/de.icke.area}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.os.Handler.dispatchMessage(Handler.java:99)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.os.Looper.loop(Looper.java:123)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.app.ActivityThread.main(ActivityThread.java:4627)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at java.lang.reflect.Method.invokeNative(Native Method)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at java.lang.reflect.Method.invoke(Method.java:521)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at dalvik.system.NativeStart.main(Native Method)
    07-05 23:49:50.667: E/AndroidRuntime(401): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.LayoutInflater.createView(LayoutInflater.java:513)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.app.Activity.setContentView(Activity.java:1647)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at de.icke.area.onCreate(area.java:17)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    07-05 23:49:50.667: E/AndroidRuntime(401):  ... 11 more
    07-05 23:49:50.667: E/AndroidRuntime(401): Caused by: java.lang.reflect.InvocationTargetException
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.widget.LinearLayout.<init>(LinearLayout.java:115)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at java.lang.reflect.Constructor.constructNative(Native Method)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.LayoutInflater.createView(LayoutInflater.java:500)
    07-05 23:49:50.667: E/AndroidRuntime(401):  ... 21 more
    07-05 23:49:50.667: E/AndroidRuntime(401): Caused by: java.lang.RuntimeException: Unknown layout animation name: set
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.animation.AnimationUtils.createLayoutAnimationFromXml(AnimationUtils.java:178)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.animation.AnimationUtils.createLayoutAnimationFromXml(AnimationUtils.java:153)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.animation.AnimationUtils.loadLayoutAnimation(AnimationUtils.java:134)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.ViewGroup.initFromAttributes(ViewGroup.java:344)
    07-05 23:49:50.667: E/AndroidRuntime(401):  at android.view.ViewGroup.<init>(ViewGroup.java:287)
    07-05 23:49:50.667: E/AndroidRuntime(401):  ... 25 more
    07-05 23:51:37.086: E/JavaBinder(71): !!! FAILED BINDER TRANSACTION !!!
    07-05 23:53:30.256: E/AndroidRuntime(473): FATAL EXCEPTION: main
    07-05 23:53:30.256: E/AndroidRuntime(473): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.icke/de.icke.area}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.os.Handler.dispatchMessage(Handler.java:99)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.os.Looper.loop(Looper.java:123)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.app.ActivityThread.main(ActivityThread.java:4627)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at java.lang.reflect.Method.invokeNative(Native Method)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at java.lang.reflect.Method.invoke(Method.java:521)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at dalvik.system.NativeStart.main(Native Method)
    07-05 23:53:30.256: E/AndroidRuntime(473): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.LayoutInflater.createView(LayoutInflater.java:513)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.app.Activity.setContentView(Activity.java:1647)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at de.icke.area.onCreate(area.java:17)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    07-05 23:53:30.256: E/AndroidRuntime(473):  ... 11 more
    07-05 23:53:30.256: E/AndroidRuntime(473): Caused by: java.lang.reflect.InvocationTargetException
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.widget.LinearLayout.<init>(LinearLayout.java:115)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at java.lang.reflect.Constructor.constructNative(Native Method)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.LayoutInflater.createView(LayoutInflater.java:500)
    07-05 23:53:30.256: E/AndroidRuntime(473):  ... 21 more
    07-05 23:53:30.256: E/AndroidRuntime(473): Caused by: java.lang.RuntimeException: Unknown layout animation name: set
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.animation.AnimationUtils.createLayoutAnimationFromXml(AnimationUtils.java:178)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.animation.AnimationUtils.createLayoutAnimationFromXml(AnimationUtils.java:153)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.animation.AnimationUtils.loadLayoutAnimation(AnimationUtils.java:134)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.ViewGroup.initFromAttributes(ViewGroup.java:344)
    07-05 23:53:30.256: E/AndroidRuntime(473):  at android.view.ViewGroup.<init>(ViewGroup.java:287)
    07-05 23:53:30.256: E/AndroidRuntime(473):  ... 25 more
    : E/(): Device disconnected
     
     
  7. Gregorrr
    Gregorrr Neues Mitglied
    Zuletzt bearbeitet: 7. Juli 2012
  8. noobee
    noobee Mitglied
    mal ne generelle frage: MUSS ich die animation in java einbinden oder reichts nicht auch aus, die animation in der betreffenden xml einzufügen?
    also einfach über [XML]android:layoutAnimation="@anim/fadein"[/XML]...
     
  9. Gregorrr
    Gregorrr Neues Mitglied
    Muss du nicht, du kannst das in XML-Referenzieren, aber du musst eine
    Code (Text):
    layoutAnimation
    xml-Datei zusätzlich anlegen. In der Stackoverflow-Frage wird das gut beschrieben.
     
  10. noobee
    noobee Mitglied
    mhh, also mit ner zweiten xml gehts leider auch nicht. ich bekomm zwar keinen fehler, aber es passiert auch keine animation -.-

    aufrufen tue ich
    [XML]android:layoutAnimation="@anim/example" >[/XML]

    in der example.xml steht
    [XML]<?xml version="1.0" encoding="utf-8"?>
    <layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android"
    android:delay="10%"
    android:animation="@anim/rotation"
    />[/XML]

    und im ordner /res/anim gibts ne rotation.xml. in der steht
    [XML]<?xml version="1.0" encoding="utf-8"?>
    <rotate
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:fromDegrees="0"
    android:toDegrees="-90"
    android:pivotX="50%"
    android:pivotY="50%"
    android:duration="0" android:fillAfter="true">
    </rotate>[/XML]

    aber es passiert nüx -.-
     
  11. Gregorrr
    Gregorrr Neues Mitglied
    ???
     

Die Seite wird geladen...

bei Animation Absturz - Ähnliche Themen

Ruckelfreie Animation
Ruckelfreie Animation im Forum AWT, Swing, JavaFX & SWT
Animation JPanel
Animation JPanel im Forum Java Basics - Anfänger-Themen
Animation, erst zeichnen dann anzeigen
Animation, erst zeichnen dann anzeigen im Forum AWT, Swing, JavaFX & SWT
Animation für Panel wechsel
Animation für Panel wechsel im Forum AWT, Swing, JavaFX & SWT
JLabel Klickanimation
JLabel Klickanimation im Forum AWT, Swing, JavaFX & SWT
Thema: bei Animation Absturz