0

The pyperclip module is not letting my android app launch. It closes as soon as I run the app on my phone. It works fine on Windows though.

Using Kivy to code the application Using Buildozer to pack an APK

import pyperclip as syscopy

syscopy.copy("Hi There")
Rakibul Islam
  • 954
  • 1
  • 14
  • 25
Chitkaran Singh
  • 1,466
  • 2
  • 10
  • 18
  • Hi, welcome to stack overflow. You need to provide all the details and mention the issue clearly what exactly you want. Please refer the [ask] link for more detail and update your question accordingly. – Jeroen Heier Jun 23 '19 at 05:28
  • I think pyperclip probably just doesn't work on Android, where interacting with the clipboard requires java api calls. You can do this using pyjnius, but I don't have an example. – inclement Jun 23 '19 at 10:25
  • I couldn't get my head around with pyjnius. However, I used kivy.core and imported Clipboard to solve my issue. – Chitkaran Singh Jun 26 '19 at 03:32

1 Answers1

0

I had the same Problem. Do you have a log.txt from your build? 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 e.g:

import pyperclip as syscopy

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

Hope it will work.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
RVLTN72
  • 41
  • 1