android - 元素类型 "rotate"必须后跟属性规范 ">"或 "/>"。

标签 android animation view

我正在尝试在 Imageview 对象上使用 View 动画。我已经为它定义了一个 rotate.xml 文件。但是我在文件中遇到了几个错误:-

1) 元素类型“rotate”必须后跟属性规范“>”或“/>”。 2)错误:解析 XML 时出错:格式不正确(无效标记)

这是我的 rotate.xml 文件:-

<?xml version="1.0" encoding="utf-8"?>
<rotate 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/linear_interpolator"
    android:fromDegrees="0"
    android:toDegrees="180"
    android:pivotX="50"
    android:pivotY="50"
    android:repeatCount="infinite"
    android:duration="3000">

</rotate>

最佳答案

如果删除 </rotate> 会发生什么并替换 >/>它可能试图解释 <rotate> 之间的空间和 </rotate>

关于android - 元素类型 "rotate"必须后跟属性规范 ">"或 "/>"。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6868065/

相关文章:

android - 安装应用程序并使其不可删除

android - Phonegap 应用程序在运行 Android ADT 20 的 Indigo 上意外停止

java - 如何正确检测碰撞?

swift - 如何为按钮设置动画以超出 View 范围

javascript - 防止点击动画过多的超时功能

CSS 转换 : matrix3d() - After transition, 图像弹回原位而不是缓动?

python - 在 View 中添加默认过滤器 - Odoo

java - try ... catch 没有捕获 IllegalArgumentException

android - 如何让按钮按下一次然后不再按下?

android - 调度触摸事件以查看在 Canvas 上绘制的事件