-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
App crashes immediately after launching on Android #653
Comments
From @tito on September 20, 2015 8:7 What phone do you have? |
From @tito on September 20, 2015 8:8 And which SDK did you use to compile? |
From @Alecktos on September 20, 2015 8:52 I've got a Nexus 4 running Android 5.1.1. I'm using SDK 21 |
From @SeanSWatkins on September 30, 2015 15:37 exactly the same issue occured with me |
From @tito on September 30, 2015 20:33 It might be related to http://stackoverflow.com/questions/27119623/android-l-5-0-does-not-search-native-libraries-in-armeabi-or-armeabi-v7a-f |
From @rammie on December 8, 2015 19:12 I'm running into this issue as well, independent of device. However, I'm able to build the same app using the same toolchain on linux (fedora 22), but receive this error when building on a mac (osx 10.11.1). I'm using buildozer pointed to the old_toolchain branch of python-for-android. Perhaps this bug should be moved to the old_toolchain branch of python-for-android? |
From @heliomaster on December 10, 2015 22:19 @tito D/houdini ( 6638): [6657] Load library /data/app/org.test.njeapp-2/lib/arm/libpython2.7.so failed. |
@heliomaster You have a different problem. You are not missing the same |
From @heliomaster on December 11, 2015 8:39 Hi kived , |
From @themanof9s on February 26, 2016 0:34 I'm having a similar error |
From @mikeyjkmo on February 26, 2016 0:41 I'm experiencing the same error whilst trying to deploy using Buildozer. I've tried changing the SDK versions etc to no avail. I'm using OSX Yosemite and my phone is a OnePlus One. |
This needs to be tested on OSX with the new toolchain. If it cannot be replicated in the new toolchain, this issue should be closed. |
Apologies for the dumb question, but how do I build with the new toolchain? |
Use the |
Hi, I'm a big fan but I am hopelessly stuck here. I've tried everything today and nothing works. I've had a similar crash on startup as OP. Then I tried installing master and using android_new target but no dice:
Then I downloaded the >1GB image in the Kivy Downloads and ran it in vmware. Out of the box, it did not work. After updating as much as I could, it still does not work. Latest error message is:
The file SDL_blit.h contains "../SDL_blit.h" so something went horribly awry. I really hope this is all fixed, I'd like to get a Master's student to play with Android apps this summer, but this is in the Mathematics department. Our students can use Python on the Desktop just fine, since it pretty much works, but they don't have the ability to debug alpha software. |
Just to add another thing I tried: I completely deleted Anaconda and switched to homebrew python 2.7. After downloading gigabytes of data it gave me errors about missing modules: first sh, then colorama, then appdirs; fixed those with pip install. Then there was a compilation error, same as this: #620 I added hostpython2 to my requirements as suggested. Then it downloaded some more large files. During a "configure" step it errored out as follows: checking whether the C compiler works... no :( Edit: I've located the log file: configure:3565: $? = 0 |
@sébastien Loisel paste the entire log On Wed, Mar 2, 2016 at 10:43 PM, Sébastien Loisel [email protected]
|
I'm having the same issue as @sloisel This looks suspicious: arm-linux-androideabi-gcc: error: Support/python-for-android/build/libs_collections/myapp/armeabi-v7a: No such file or directory |
Which log, this one? There are logs all over!
|
Including some libs in your app? Try to change bulldozer.spec android.add_libs_armeabi_v7a = libs/android-v7/*.so see if that helps. On Thu, Mar 3, 2016 at 1:34 AM, Ben Barrett [email protected]
|
@sloisel @akshayaurora probably meant the buildozer build log and the full adb logcat log when the app crashes. Could you also open a new issue for this? Your errors so far don't seem to match the one in the original post here. Thanks. |
@sloisel @afish8ben You are talking about a known issue (#622), and is unrelated to this issue. |
@kived indeed thanks. |
Oh, this one again? Ugh. @sloisel @afish8ben In that case, you can look at #624 as a workaround, but that PR isn't good to merge because it doesn't apply to other platforms. In the absence of any better ideas, shall we just use ~/.python-for-android on OS X? @kived, what do you think? |
I do have the same issue as OP: when I install an app on my phone it crashes on startup. My subsequent posts were all my attempts at following instructions e.g. @kived's instructions above to use pip install https://github.com/kivy/buildozer/archive/master.zip. For the logcat, obviously that is a continuous thing so there is no such thing as the "entire" logcat, but I suspect this has something to do with it: E/art ( 9598): dlopen("/data/app/org.loisel.seb-1/lib/arm/libpython2.7.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "exp" referenced by "libpython2.7.so"... Here is a broader part of it: |
Hi I have a very similar issue: not finding "pow". Also on a mac (El Captan). Latest buildozer (0.31, tried 0.30 as well). Latest Kivy (Kivy-1.9.1-osx-python2.7z). Tried a few different NDK (11, 10e, 9d). Don't know the architecture of all this but slowly come to the conclusion it's python-for-android related. @kived Also tried Logcat:
Output when building with # Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /Users/franchan/local/package/cython/bin/cython
# Search for Java compiler (javac)
# -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/javac
# Search for Java keytool (keytool)
# -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/keytool
# Install platform
# Apache ANT found at /Users/franchan/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /Users/franchan/Library/Android/sdk
# Android NDK found at /Users/franchan/Library/Android/ndk/android-ndk-r10e-darwin-x86_64
# Check application requirements
# Run 'python -m pythonforandroid.toolchain recipes --compact'
# Cwd /Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 24, in <module>
import sh
ImportError: No module named sh
# Command failed: python -m pythonforandroid.toolchain recipes --compact
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2 |
Your android_new error indicates that you need to install the sh module. On 13/03/16 20:40, aptly-io wrote:
|
@inclement Yes, thanks, but where do I need to change those build tools so it pulls in all dependencies, including sh module? I use home-brew on the mac. It falls back on the bundled python-2.7 ... (I'm just playing with this for 1 day so I'm unfamiliar with kivy/buildozer) Python 2.7.10 (default, Oct 23 2015, 18:05:06)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sh
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named sh |
Buildozer does not currently install all of the dependencies of the new On 13/03/16 20:49, aptly-io wrote:
|
@inclement Oke, thanks, figured it out ... next seems to be a missing colorama, appdirs ... then crunched on a bit and bailed out see below. Should I conclude that building on OSX for Maybe the attribute is missing cause it could not figure out the build platform somewhere? [INFO]: kivy has no prebuild_armeabi_v7a, skipping
[INFO]: # Building recipes
[INFO]: Building python2 for armeabi-v7a
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 747, in <module>
main()
File "/Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 744, in main
ToolchainCL()
File "/Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 323, in __init__
getattr(self, args.command)(unknown)
File "/Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 105, in wrapper_func
build_dist_from_args(ctx, dist, dist_args)
File "/Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 142, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "pythonforandroid/build.py", line 560, in build_recipes
recipe.build_arch(arch)
File "/Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py", line 44, in build_arch
self.do_python_build(arch)
File "/Users/franchan/Documents/dev/kivy/helloworld/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py", line 76, in do_python_build
shprint(sh.cp, self.ctx.hostpython, self.get_build_dir(arch.arch))
AttributeError: 'Context' object has no attribute 'hostpython'
# Command failed: python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs |
What does building for ios have to do with this? This is about I thought this error was fixed in the master branch quite a few days On 13/03/16 21:02, aptly-io wrote:
|
@inclement started playing with kivy on OSX today. I listed all versions earlier; basically just git cloned kivy and buildozer some hours ago. Hmm, git log mentions the last commit 768bb on Mon Feb 29. That's more than a few days ... so I guess I've the latest stuff ... franchans-Mac-mini:buildozer franchan$ git status -b
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
franchans-Mac-mini:buildozer franchan$ git remote -v
origin https://github.com/kivy/buildozer.git (fetch)
origin https://github.com/kivy/buildozer.git (push) |
@inclement Ha, sorry (wrote IOS because my head is partly into IOS). Should have written (and will edit comment) that building for android on OSX might be unstable is because earlier comments mentioned that it builds (Kivy hello world app) on other-than-OSX platforms and runs find under android. |
I am having the same problem. The app crashes when it is launched. I also tried
Any clues would be appreciated... Update: For future reference, I managed to debug the app this way: I run it through "Kivy Launcher" (instructions here: https://kivy.org/docs/guide/packaging-android.html#packaging-your-application-for-the-kivy-launcher), and I saw the following on the Kivy Launcher log file:
I search a little and I found this issue: #54. I commented out the I build the app again, and it works. |
I couldn't get the Kivy launcher apk to work. Kept saying "put the project in /mnt/internal_sd/kivy" but it would never load the main.py/android.txt. Also, couldn't download the examples because of 404 for the link: http://kivy.googlecode.com/files/kivydemo-for-android.zip. I'm guessing kivy is dead. Any ideas? |
Kivy is not dead, just that link. I'll remove it from the doc (I'm not If you think there is an issue with the launcher, please post this On 01/10/16 15:26, Frank wrote:
|
Update: Typo, the folder I put my kivy main.py/android.txt project into was /mnt/internal_sd/kivy. |
Hey Guys easy fix, you need to have a main.py file |
Was getting similar error building on mac. App worked fine for my test device(running Android 6.0.1 building with old toolchain but crashed using my own phone(running Android 4.2). Threw error |
@kived so did U fix the issue with
|
Hello All, I have developed a very simple app with Kivy & KivyMD and everything works fine on my computer. Even the build for android (command: buildozer android debug) works perfectly fine on my computer, but the app crashes immediately after running on Android. I seem not to be able to find out what the problem is. I have attached both buildozer.spec (I had to change it to buildozer.txt to upload) and logcat.txt for your review. Please help. PS. I used buildozer 0.33 on the Kivy VM 2.0 |
@raythenewuser Please stop spamming old issues with your problem, opening a new issue (as you already have) is sufficient and appropriate. |
Ok, sorry abt that |
the solution that worked on my side is that instead of using a capital letter for Main.py I used a small letter main.py and it worked.. app did not crash.. |
I had the same problem and how i fix my is i save my python script as main.py n it works. |
Closing as stale, I think the underlying issues with linking and loading libraries have been fixed. |
From @Alecktos on September 19, 2015 16:8
There seem to be a problem running apps on Android. It works fine I'm when running it on Mac OS but crashes immediately after the source files have been extracted on Android. I'm using buildozer to build it and what I can see there are no problems when building the app.
I/python (14025): extracting lib/python2.7/site-packages/pygame/threads/init.pyo
I/python (14025): extracting main.pyo
I/python (14025): extracting renderer.pyo
I/python (14025): extracting sitecustomize.pyo
W/ResourceType(14025): No package identifier when getting value for resource number 0x00000000
E/art (14025): dlopen("/data/app/org.test.myapp-2/lib/arm/libpython2.7.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "exp" referenced by "libpython2.7.so"...
E/AndroidRuntime(14025): FATAL EXCEPTION: Thread-757
E/AndroidRuntime(14025): Process: org.test.myapp:python, PID: 14025
E/AndroidRuntime(14025): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "exp" referenced by "libpython2.7.so"...
E/AndroidRuntime(14025): at java.lang.Runtime.loadLibrary(Runtime.java:371)
E/AndroidRuntime(14025): at java.lang.System.loadLibrary(System.java:988)
E/AndroidRuntime(14025): at org.renpy.android.PythonActivity.run(PythonActivity.java:254)
E/AndroidRuntime(14025): at java.lang.Thread.run(Thread.java:818)
W/ActivityManager( 562): Force finishing activity 1 org.test.myapp/org.renpy.android.PythonActivity
Copied from original issue: kivy/kivy#3644
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: