Skip to content

Commit

Permalink
Added libffi headers troubleshooting note to doc (kivy#1972)
Browse files Browse the repository at this point in the history
  • Loading branch information
inclement authored and joergbrech committed Nov 10, 2019
1 parent d2357cb commit a1310fc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions doc/source/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ get help with any problems using the same channels as Kivy itself:
- by email to the `kivy-users Google group
<https://groups.google.com/forum/#!forum/kivy-users>`_
- on `#support Discord channel <https://chat.kivy.org/>`_

If you find a bug, you can also post an issue on the
`python-for-android Github page
<https://github.com/kivy/python-for-android>`_.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.

0 comments on commit a1310fc

Please sign in to comment.