Animation keeps crashing on a samsung galaxy-Collection of common programming errors

Im having a issue were my app keeps crashing on an animation I’m attempting to do. It works fine on my Razr version 4.1.2 but on the galaxy it crashes with a NumberFormatException it has version 2.3.6.

Can anyone tell my why this is crashing? I am still trying to figure out if this is a sdk version issue. Also I tried to install my signed .apk on a samsung S3 and it wont even install. It just gives me a blank screen. This seems to only be an issue with Samsung phones.

    public class RSEanimation extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);     
        super.setContentView(R.layout.startup);
        final ImageView animationTarget1 = (ImageView) this.findViewById(R.id.rseImage);
        final TextView animationTarget2 = (TextView) this.findViewById(R.id.textView1);
        final TextView animationTarget3 = (TextView) this.findViewById(R.id.textView2);
        final TextView animationTarget4 = (TextView) this.findViewById(R.id.textView3);
        Animation animation = AnimationUtils.loadAnimation(this, R.anim.scale);
        final Animation animation1 = AnimationUtils.loadAnimation(this, R.anim.left_to_right);
        final Animation animation2 = AnimationUtils.loadAnimation(this, R.anim.left_to_right);
        final Animation animation3 = AnimationUtils.loadAnimation(this, R.anim.left_to_right);
        final Animation animation4 = AnimationUtils.loadAnimation(this, R.anim.right_to_left);
        animationTarget1.startAnimation(animation);
        animationTarget4.setVisibility(View.VISIBLE);
        animationTarget4.startAnimation(animation1);        

        animation1.setAnimationListener(new AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {}
            @Override
            public void onAnimationRepeat(Animation animation) {} 
            @Override
            public void onAnimationEnd(Animation animation) {
                animationTarget3.setVisibility(View.VISIBLE);
                animationTarget3.startAnimation(animation2);
            }
        });
        animation2.setAnimationListener(new AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {}
            @Override
            public void onAnimationRepeat(Animation animation) {}
            @Override
            public void onAnimationEnd(Animation animation) {
                animationTarget2.setVisibility(View.VISIBLE);
                animationTarget2.startAnimation(animation3);
            }
        });
        animation3.setAnimationListener(new AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {}

            @Override
            public void onAnimationRepeat(Animation animation) {
            }
            @Override
            public void onAnimationEnd(Animation animation) {
                animationTarget1.startAnimation(animation4);
                animationTarget2.startAnimation(animation4);
                animationTarget3.startAnimation(animation4);
                animationTarget4.startAnimation(animation4);
            }
        });
        animation4.setAnimationListener(new AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {}

            @Override
            public void onAnimationRepeat(Animation animation) {
            }

            @Override
            public void onAnimationEnd(Animation animation) {
                animationTarget1.setVisibility(View.INVISIBLE);
                animationTarget2.setVisibility(View.INVISIBLE);
                animationTarget3.setVisibility(View.INVISIBLE);
                animationTarget4.setVisibility(View.INVISIBLE);
                 RSEanimation.this.startActivity(new Intent(RSEanimation.this, RiverConditionsActivity.class));

            }
        });


       }

     @Override
        public void onRestart() {
              super.onRestart();   
                  finish();
     }
    }

logcat:

06-22 19:53:41.164: W/ResourceType(5374): Entry identifier 0x12c is larger than entry count 0xac
06-22 19:53:41.187: W/Resources(5374): Converting to float: TypedValue{t=0x6/d=0x20c530 a=-1}
06-22 19:53:41.187: W/dalvikvm(5374): threadid=1: thread exiting with uncaught exception (group=0x40015578)
06-22 19:53:41.195: E/AndroidRuntime(5374): FATAL EXCEPTION: main
06-22 19:53:41.195: E/AndroidRuntime(5374): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rse.jamesriver/com.rse.jamesriver.RSEanimation}: java.lang.NumberFormatException
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.os.Looper.loop(Looper.java:130)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.app.ActivityThread.main(ActivityThread.java:3687)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at java.lang.reflect.Method.invokeNative(Native Method)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at java.lang.reflect.Method.invoke(Method.java:507)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at dalvik.system.NativeStart.main(Native Method)
06-22 19:53:41.195: E/AndroidRuntime(5374): Caused by: java.lang.NumberFormatException
06-22 19:53:41.195: E/AndroidRuntime(5374):     at org.apache.harmony.luni.util.FloatingPointParser.parseFltImpl(Native Method)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at org.apache.harmony.luni.util.FloatingPointParser.parseFloat(FloatingPointParser.java:321)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at java.lang.Float.parseFloat(Float.java:323)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.content.res.TypedArray.getFloat(TypedArray.java:287)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at  06-22 19:53:41.195:E/AndroidRuntime(5374):  at android.view.animation.AnimationUtils.createAnimationFromXml(AnimationUtils.java:110)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.view.animation.AnimationUtils.createAnimationFromXml(AnimationUtils.java:106)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.view.animation.AnimationUtils.createAnimationFromXml(AnimationUtils.java:83)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.view.animation.AnimationUtils.loadAnimation(AnimationUtils.java:64)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at com.rse.jamesriver.RSEanimation.onCreate(RSEanimation.java:25)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-22 19:53:41.195: E/AndroidRuntime(5374):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)

Left_to_Right

    
 
  

Right_to_Left

    
 
 

Scale

    
 
 

 
  1. Your problem is with the % signs in the scale.xml file for the scale element. Those are not required as the value of those attributes needs to be float, not string.

    
        
        
    
    

Originally posted 2013-12-02 01:34:44.