Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
发现问题出在了getClip(),就利用setClip()做预设。依然不行。网上搜索获得;从安卓Q(即10.0)开始,google限制了后台程序对剪贴板的访问.AndroidQ 对剪切板的改动是:当应用没有获取到焦点时,无法读取剪切板内容。
开发原话:从Android 10开始,应用无法在后台读写剪贴板。如果你在后台时需要和用户交互并读写剪贴板,可以尝试使用悬浮窗获取焦点,再读写剪贴板。