标题 报错:setGravity() shouldn’t be called on text toasts, the values won’t be used 报错原因:targetSdkVersion 30及以上版本不适用,设置成更低版本就可以了 解决方法: 1.降低版本 2.使用AlertDailog(对话框)