Cant create animation in android studio: resource identifier not found -


i created simple xml animation under res/anim/rotate180.xml

<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android">     <rotate         android:duration="500"         android:fromdegrees="0"         android:pivotx="50%"         android:pivoty="50%"         android:todegrees="180"         android:toyscale="0.0" /> </set> 

but cant run project:

agpbi: {"kind":"error","text":"no resource identifier found attribute \u0027fromdegrees\u0027 in package \u0027android\u0027","sourcepath":"\\src\\main\\res\\anim\\rotate180.xml","position":{"startline":3},"original":""} agpbi: {"kind":"error","text":"no resource identifier found attribute \u0027pivotx\u0027 in package \u0027android\u0027","sourcepath":"\\src\\main\\res\\anim\\rotate180.xml","position":{"startline":3},"original":""} agpbi: {"kind":"error","text":"no resource identifier found attribute \u0027pivoty\u0027 in package \u0027android\u0027","sourcepath":"\\src\\main\\res\\anim\\rotate180.xml","position":{"startline":3},"original":""} agpbi: {"kind":"error","text":"no resource identifier found attribute \u0027todegrees\u0027 in package \u0027android\u0027","sourcepath":"\\src\\main\\res\\anim\\rotate180.xml","position":{"startline":3},"original":""} agpbi: {"kind":"error","text":"no resource identifier found attribute \u0027toyscale\u0027 in package \u0027android\u0027","sourcepath":"\\src\\main\\res\\anim\\rotate180.xml","position":{"startline":3},"original":""} 

isnt correct way create animation?

you don't have attributes in animtion.xml defined. names case sensitive, need change them.

for example, need change: fromdegrees fromdegrees (notice camelcase?)

here example have (that works) proper attribute definiton:

<rotate     android:duration="1200"     android:fromdegrees="0"     android:pivotx="50%"     android:pivoty="50%"     android:todegrees="360" /> 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -