gpt4 book ai didi

android - 顺序动画 XML 中的错误

转载 作者:行者123 更新时间:2023-11-29 16:02:17 28 4
gpt4 key购买 nike

我正在其中使用动画。我在使用顺序动画时遇到编译时错误。

错误是:

Multiple annotations found at this line:
- error: No resource identifier found for attribute 'pivotX' in package
'android '
- error: No resource identifier found for attribute 'fromXScale' in package
'android '
- error: No resource identifier found for attribute 'toXScale' in package
'android '
- error: No resource identifier found for attribute 'toYScale' in package
'android '
- error: No resource identifier found for attribute 'duration' in package
'android '
- error: No resource identifier found for attribute 'fromYScale' in package
'android '
- error: No resource identifier found for attribute 'pivotY' in package
'android '

我的 xml 代码是:

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android "
android:fillAfter="true"
android:interpolator="@android:anim/linear_interpolator" >

<scale
xmlns:android="http://schemas.android.com/apk/res/android "
android:duration="1000"
android:fromXScale="1"
android:fromYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="3"
android:toYScale="3" >
</scale>


<scale
xmlns:android="http://schemas.android.com/apk/res/android "
android:duration="1000"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="0.5"
android:toYScale="0.5" >
</scale>

</set>

谁能告诉我为什么是因为?

最佳答案

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" **<----- remove space**
android:fillAfter="true"
android:interpolator="@android:anim/linear_interpolator" >

<scale
xmlns:android="http://schemas.android.com/apk/res/android "
android:duration="1000"
android:fromXScale="1"
android:fromYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="3"
android:toYScale="3" >
</scale>


<scale
xmlns:android="http://schemas.android.com/apk/res/android "
android:duration="1000"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="0.5"
android:toYScale="0.5" >
</scale>

关于android - 顺序动画 XML 中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23147588/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com