Skip to content

Added libffi headers troubleshooting note to doc #1972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.