Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了android – 错误:(3)解析XML时出错:格式不正确(无效令牌)大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是我的xml文件,然后是anim文件夹.当我运行应用程序时,会显示解析错误.

shake.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://scheR_104_11845@as.android.com/apk/res/android">
< translate xmlns:android="http://scheR_104_11845@as.android.com/apk/res/android"
    android:duration="1000"
    android:fromXDelta="0%"
    android:interpolator="@anim/cycle_7"
    android:toXDelta="5%" />
</set>

cycle_7.xml

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://scheR_104_11845@as.android.com/apk/res/android">
< cycleInterpolator xmlns:android="http://scheR_104_11845@as.android.com/apk/res/android"
    android:cycles="7" />
</set>

解决方法

IT People Always Welcome在这里您可以找到您正在寻找的完整代码.

shake.xml

<translate xmlns:android="http://scheR_104_11845@as.android.com/apk/res/android" android:fromXDelta="0%" android:toXDelta="5%" android:duration="1000" android:interpolator="@anim/cycle_7" />

cycle_7.xml

<cycleInterpolator xmlns:android="http://scheR_104_11845@as.android.com/apk/res/android" android:cycles="7" />

如何使用:

private void showError() {
      Animation shake = AnimationUtils.loadAnimation(this,R.anim.shakE);
      mEditText.startAnimation(shakE);
}

编辑:

>我认为你之间有空间<如果您复制了代码,请翻译.看看这个.
>< set>不是必需的,因为我已经使用上面的代码运行演示它工作正常.

谢谢.愿这对你有所帮助.

大佬总结

以上是大佬教程为你收集整理的android – 错误:(3)解析XML时出错:格式不正确(无效令牌)全部内容,希望文章能够帮你解决android – 错误:(3)解析XML时出错:格式不正确(无效令牌)所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。