Skip to content

Kivy app crashing on android after installation, what is the issue here? #2433

Closed

Description

@rizwan-amir

python : Traceback (most recent call last):
02-28 18:44:49.164 17248 17312 I python : File "/content/.buildozer/android/app/main.py", line 16, in
02-28 18:44:49.165 17248 17312 I python : File "/content/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/maidenapp/cv2/init.py", line 5, in
02-28 18:44:49.166 17248 17312 I python : ImportError: dlopen failed: "/data/data/maiden.test.maidenapp/files/app/_python_bundle/site-packages/cv2/cv2.so" is 64-bit instead of 32-bit
02-28 18:44:49.166 17248 17312 I python : Python for android ended.

Activity

  1. RobertFlatt commented on Mar 5, 2021

    @RobertFlatt
    Contributor

    We know that opencv works, so this looks like pilot error. But I suspect not....

    1. There is a history of unresolved cases like this https://groups.google.com/g/kivy-users/search?q=cv2.so

    2. Typing to the OP on Reddit, they are using an arm7 device https://www.reddit.com/r/kivy/comments/lvfutk/my_android_app_made_in_kivy_crashes_on_being/

    3. Looking at the recipe we see that the build instructions for cv2.so are different
      Its build arch depends not on arch.arch but on the Python build architecture.
      https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/recipes/opencv/patches/p4a_build.patch#L2

    So I suspect the recipe is always building a 64-bit cv2.so , which is exactly the message the OP gets.
    This was not found previously because an arm7 (or mixed binary) will run on arm8, and an arm7 binary will run on arm7, it just the mixed binary generated by this recipe that won't run on an arm7 device.

  2. RobertFlatt commented on Mar 6, 2021

    @RobertFlatt
    Contributor

    My guess I was wrong

    cd .buildozer/android/platform/build-armeabi-v7a/dists/myapp__armeabi-v7a/_python_bundle/_python_bundle/site-packages/
    
    file cv2.so
    cv2.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=904e27df6a9748088bfb80ed7c04030c6123d16f, stripped
    
    
  3. stelin41 commented on Jun 27, 2021

    @stelin41

    Follow this tutorial. It worked for me.

  4. github-actions commented on Nov 1, 2021

    @github-actions

    👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.

    If you're having trouble installing or using python-for-android, maybe you could be interested in our quickstart guide.

    Let us know if this comment was made in error, and we'll be happy to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions