From a1310fcb3e9f8073b667795bf3be8f06d0a282a1 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Mon, 26 Aug 2019 15:01:19 +0100 Subject: [PATCH] Added libffi headers troubleshooting note to doc (#1972) --- doc/source/troubleshooting.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/source/troubleshooting.rst b/doc/source/troubleshooting.rst index 87194de98e..f213e8d9eb 100644 --- a/doc/source/troubleshooting.rst +++ b/doc/source/troubleshooting.rst @@ -24,7 +24,7 @@ get help with any problems using the same channels as Kivy itself: - by email to the `kivy-users Google group `_ - on `#support Discord channel `_ - + If you find a bug, you can also post an issue on the `python-for-android Github page `_. @@ -58,7 +58,7 @@ grepping this). When your app crashes, you'll see the normal Python traceback here, as well as the output of any print statements etc. that your app runs. Use these to diagnose the problem just as normal. - + The adb command passes its arguments straight to adb itself, so you can also do other debugging tasks such as ``python-for-android adb devices`` to get the list of connected devices. @@ -88,7 +88,7 @@ At the top level, this will always contain the same set of files:: The Python distribution is in the assets folder:: $ cd assets - $ ls + $ ls private.mp3 ``private.mp3`` is actually a tarball containing all your packaged @@ -169,7 +169,7 @@ fix it, change your code to reference websocket-client: if you see errors relating to 'SSL not available' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ensure you have the package backports.ssl-match-hostname in the buildozer requirements, since Kivy targets python 2.7.x - + You may also need sslopt={"cert_reqs": ssl.CERT_NONE} as a parameter to ws.run_forever() if you get an error relating to host verification Requested API target 19 is not available, install it with the SDK android tool @@ -183,3 +183,10 @@ version). If using buildozer this should be done automatically, but as a workaround you can run these from ``~/.buildozer/android/platform/android-sdk-20/tools/android``. + +ModuleNotFoundError: No module named '_ctypes' +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You do not have the libffi headers available to python-for-android, so you need to install them. On Ubuntu and derivatives these come from the `libffi-dev` package. + +After installing the headers, clean the build (`p4a clean builds`, or with buildozer delete the `.buildozer` directory within your app directory) and run python-for-android again.