here is another answer which works perfectly:
from kivy.clock import Clock
#rest of the code above
def build(self):
layout = GridLayout(cols=1, padding=10)
anim = Builder.load_string(kv)
layout.add_widget(anim)
popup = Popup(content=layout)
popup.open()
print('Hello world')
Clock.schedule_once(App().get_running_app().stop,10)#....rest of the code below
u can use the clock feature. idk why i forgot it lol ;D
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…