1

I've used some Viewproperty animation in my application. Once it compile on android 3.0 tablet its working fine, if run on 3.0 emulator application crashes and its showing error on logcat.

Code:

ImageButton home = (ImageButton)findViewById(R.id.Home);
home.animate().setDuration(200);
smmslogo.animate().alpha(1);

Error:

java.lang.NullPointerException
at android.view.ViewPropertyAnimator.animatePropertyBy

can anyone help me?

4

1 回答 1

1

我认为崩溃与http://code.google.com/p/android/issues/detail?id=18803上的错误有关

尝试使用此调用:

ObjectAnimator.ofFloat(home, "alpha", 0f, 1f).setDuration(200).start();
于 2012-11-06T16:30:19.503 回答