我正在尝试动画应用。它显示了一个错误代码,表示构建需要两个参数(给定1个)。这是我的代码:
from kivy.app import App
from kivy.uix.image import Image
from kivy.animation import Animation
class TheApp(App):
def build(self, instance):
self.instance= instance
image = Image(source= "psychTREE.jpg")
image.allow_stretch= True
animation = Animation(pos= (100, 100), t= "out_bounce")
animation += Animation(pos= (200, 100), t = "out_bounce")
animation &= Animation(size= (500, 500))
animation += Animation(size= (100, 50))
image = animation.start(instance)
return image
if __name__ == "__main__":
TheApp().run()