加入 import tkinter.messagebox
问题解决。
Exception in Tkinter callback
Traceback (most recent call last):
File “/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.8/tkinter/init.py”, line 1883, in call
return self.func(*args)
File “/storage/emulated/0/baidu/获取当前时间.py”, line 17, in 重置
tk.messagebox.showinfo(title=‘reset’,message=‘重置成功’)
AttributeError: module ‘tkinter’ has no attribute ‘messagebox’