手机
当前位置:查字典教程网 >编程开发 >安卓软件开发 >android studio的xml没有ObjectAnimator
android studio的xml没有ObjectAnimator
摘要:看到了一篇博客,在xml动画文件中使用ObjectAnimator节点,后来把源码下下来,载eclipse重打开,可以使用,但是在andro...

看到了一篇博客,在xml动画文件中使用ObjectAnimator节点,后来把源码下下来,载eclipse重打开,可以使用,但是在android studio中不能使用ObjectAnimator节点,怎么回事,求高手指点。

下面是源码:

< ?xml version="1.0" encoding="utf-8"? >

< set xmlns:android="http://schemas.android.com/apk/res/android"

    android:ordering="together"  >

    < objectAnimator

        android:duration="1000"

        android:propertyName="scaleX"

        android:valueFrom="1"

        android:valueTo="0.5"  >

    < /objectAnimator >

    < objectAnimator

        android:duration="1000"

        android:propertyName="scaleY"

        android:valueFrom="1"

        android:valueTo="0.5"  >

    < /objectAnimator >

< /set >

下面是报错信息:

Error:Execution failed for task ':app:processDebugResources'.

> com.android.ide.common.process.ProcessException: Failed to execute aapt

Error:(1) Error parsing XML: XML or text declaration not at start of entity

D:datahongchuangkbMaintainClientcarownercomingappbuildintermediatesresmergeddebuganimanim_xml.xml

Error:(1) Error parsing XML: XML or text declaration not at start of entity

Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]

D:datahongchuangkbMaintainClientcarownercomingappsrcmainresanimanim_xml.xml

Information:BUILD FAILED

Information:Total time: 5.064 secs

Information:3 errors

Information:0 warnings

Information:See complete output in console

回复讨论(解决方案)

放到res/animator文件夹下 可以了,多谢!

【android studio的xml没有ObjectAnimator】相关文章:

Android相册效果

Android 动画之RotateAnimation应用详解

android横竖屏切换时候Activity的生命周期

android GridView多选效果的实例代码

Android 路径查询

android平台中的模拟器 hardWare 属性

android 桌面 未读角标

基于Android ContentProvider的总结详解

android通用xml解析方法

Android CheckBox 的使用案例分析

精品推荐
分类导航