简体   繁体   English

Pyperclip 模块在 Android 上失败

[英]Pyperclip Module failed on Android

The pyperclip module is not letting my android app launch. pyperclip 模块不允许我的 android 应用程序启动。 It closes as soon as I run the app on my phone.一旦我在手机上运行该应用程序,它就会关闭。 It works fine on Windows though.不过它在 Windows 上运行良好。

Using Kivy to code the application Using Buildozer to pack an APK使用 Kivy 编写应用程序 使用 Buildozer 打包 APK

import pyperclip as syscopy

syscopy.copy("Hi There")

I had the same Problem.我有同样的问题。 Do you have a log.txt from your build?你的构建中有 log.txt 吗? If so, check whether it is a Permission Error or not.如果是这样,请检查它是否是权限错误。 If it is a Permission Error, you have to get the code in to a try and except eg:如果是权限错误,您必须尝试输入代码,除了例如:

import pyperclip as syscopy

try:
  syscopy.copy("Hi There")
except(PermissionError):
  print("There is an error!")

Hope it will work.希望它会起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM