NoSuchMethodError: android.widget.ImageView.setPivotX
While setting the pivotx for my开发者_如何学编程 imageview I am getting the following error during run time:
10-06 03:27:28.190: ERROR/AndroidRuntime(327): java.lang.NoSuchMethodError: android.widget.ImageView.setPivotX
What does this mean?As far as I know setPivotX is a valid method for an imageview..
Here is the code:
private void updateRotation(double angle)
{
mTop.setPivotX(mTop.getWidth()/2);
mTop.setPivotY(mTop.getHeight()/2);
mTop.setRotation(180);
}
As stated in in the docs setPivotX
is only available on API Level 11 (Android 3.0). You must be running on a device/emulator with an earlier version.
精彩评论