안녕하세요. 이번에 진저브레드로 개발을 하다가
아무리 찾아도 원인을 모르겠어서 이렇게 글을 남기게 되었습니다.
기반이 되는 OS는 진저브레드(2.3.3) 입니다.
하지만 3.0 이상에서 지원되는 애니메이션의 기능을 쓰기위해 ObjectAnimator, ValueAnimator 등을 사용하는데요.
프로젝트 minium sdk는 진저브레드 , target sdk는 진저브레드도 해보고 젤리빈도 해봤습니다.
compile with는 젤리빈으로 했구요...
하지만 동작시키려는 진저브레드에서는 동작이 안되고 젤리빈이 깔린 휴대폰에서만 동작이 되더라고요.ㅠ
하위 api 에서는 상위 api 클래스를 가져다 쓰지 못하나요?ㅠ
혹시나해서 실행시킬 때 로그를 첨부했습니다.
03-06 15:55:43.450: I/dalvikvm(1070): Could not find method android.animation.ObjectAnimator.ofInt, referenced from method com.example.exer380.BallAnim$AnimView.startAnim
03-06 15:55:43.450: W/dalvikvm(1070): VFY: unable to resolve static method 7: Landroid/animation/ObjectAnimator;.ofInt (Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;
03-06 15:55:43.450: D/dalvikvm(1070): VFY: replacing opcode 0x71 at 0x000a
03-06 15:55:43.450: D/dalvikvm(1070): VFY: dead code 0x000d-001e in Lcom/example/exer380/BallAnim$AnimView;.startAnim ()V
03-06 15:55:44.550: D/AndroidRuntime(1070): Shutting down VM
03-06 15:55:44.550: W/dalvikvm(1070): threadid=1: thread exiting with uncaught exception (group=0x40015560)
03-06 15:55:44.550: E/AndroidRuntime(1070): FATAL EXCEPTION: main
03-06 15:55:44.550: E/AndroidRuntime(1070): java.lang.IllegalStateException: Could not execute method of the activity
03-06 15:55:44.550: E/AndroidRuntime(1070): at android.view.View$1.onClick(View.java:2144)
03-06 15:55:44.550: E/AndroidRuntime(1070): at android.view.View.performClick(View.java:2485)
03-06 15:55:44.550: E/AndroidRuntime(1070): at android.view.View$PerformClick.run(View.java:9080)
03-06 15:55:44.550: E/AndroidRuntime(1070): at android.os.Handler.handleCallback(Handler.java:587)
03-06 15:55:44.550: E/AndroidRuntime(1070): at android.os.Handler.dispatchMessage(Handler.java:92)
03-06 15:55:44.550: E/AndroidRuntime(1070): at android.os.Looper.loop(Looper.java:130)
03-06 15:55:44.550: E/AndroidRuntime(1070): at android.app.ActivityThread.main(ActivityThread.java:3703)
03-06 15:55:44.550: E/AndroidRuntime(1070): at java.lang.reflect.Method.invokeNative(Native Method)
03-06 15:55:44.550: E/AndroidRuntime(1070): at java.lang.reflect.Method.invoke(Method.java:507)
03-06 15:55:44.550: E/AndroidRuntime(1070): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-06 15:55:44.550: E/AndroidRuntime(1070): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-06 15:55:44.550: E/AndroidRuntime(1070): at dalvik.system.NativeStart.main(Native Method)
03-06 15:55:44.550: E/AndroidRuntime(1070): Caused by: java.lang.reflect.InvocationTargetException
03-06 15:55:44.550: E/AndroidRuntime(1070): at java.lang.reflect.Method.invokeNative(Native Method)
03-06 15:55:44.550: E/AndroidRuntime(1070): at java.lang.reflect.Method.invoke(Method.java:507)
03-06 15:55:44.550: E/AndroidRuntime(1070): at android.view.View$1.onClick(View.java:2139)
03-06 15:55:44.550: E/AndroidRuntime(1070): ... 11 more
03-06 15:55:44.550: E/AndroidRuntime(1070): Caused by: java.lang.NoClassDefFoundError: android.animation.ObjectAnimator
03-06 15:55:44.550: E/AndroidRuntime(1070): at com.example.exer380.BallAnim$AnimView.startAnim(BallAnim.java:46)
03-06 15:55:44.550: E/AndroidRuntime(1070): at com.example.exer380.BallAnim.mOnClick(BallAnim.java:31)
03-06 15:55:44.550: E/AndroidRuntime(1070): ... 14 more
03-06 15:55:46.355: I/Process(1070): Sending signal. PID: 1070 SIG: 9
긴글 읽어주셔서 감사합니다.ㅠ 안드로이드 초보에게 구원의 빛을 보여주세요.ㅠㅠ