Skip to content
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

Closed
kived opened this issue Feb 26, 2016 · 47 comments
Closed

App crashes immediately after launching on Android #653

kived opened this issue Feb 26, 2016 · 47 comments

Comments

@kived
Copy link
Contributor

kived commented Feb 26, 2016

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.

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

From @tito on September 20, 2015 8:7

What phone do you have?

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

From @tito on September 20, 2015 8:8

And which SDK did you use to compile?

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

From @Alecktos on September 20, 2015 8:52

I've got a Nexus 4 running Android 5.1.1. I'm using SDK 21

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

From @SeanSWatkins on September 30, 2015 15:37

exactly the same issue occured with me
Using NDK r9d, API v14
Any device

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

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?

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

From @heliomaster on December 10, 2015 22:19

@tito
@rammie
Hi Guys,
I believe I have the same problem here on OSX 10.9.5:

D/houdini ( 6638): [6657] Load library /data/app/org.test.njeapp-2/lib/arm/libpython2.7.so failed.
E/art ( 6638): dlopen("/data/app/org.test.njeapp-2/lib/arm/libpython2.7.so", RTLD_LAZY) failed: dlopen failed: "/data/app/org.test.njeapp-2/lib/arm/libpython2.7.so" has unexpected e_machine: 40

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

@heliomaster You have a different problem. You are not missing the same exp symbol as the original post. You're also using Android x86, while P4A compiles for ARM. This usually works fine via houdini, but apparently houdini is rejecting for some reason (and you didn't include that reason, which should have been right above those lines from the log). Feel free to open a new issue.

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

From @heliomaster on December 11, 2015 8:39

Hi kived ,
I will open the issue, thank you for the answer.

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

From @themanof9s on February 26, 2016 0:34

I'm having a similar error
E/art (18347): dlopen("/data/app/org.test.mypainter-1/lib/arm/libpython2.7.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "exp" referenced by "libpython2.7.so"...
E/AndroidRuntime(18347): FATAL EXCEPTION: Thread-4308
E/AndroidRuntime(18347): Process: org.test.mypainter:python, PID: 18347
E/AndroidRuntime(18347): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "exp" referenced by "libpython2.7.so"...
E/AndroidRuntime(18347): at java.lang.Runtime.loadLibrary(Runtime.java:371)
E/AndroidRuntime(18347): at java.lang.System.loadLibrary(System.java:988)
E/AndroidRuntime(18347): at org.renpy.android.PythonActivity.run(PythonActivity.java:254)
E/AndroidRuntime(18347): at java.lang.Thread.run(Thread.java:818)

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

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.

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

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.

@mikeyjkmo
Copy link

Apologies for the dumb question, but how do I build with the new toolchain?

@kived
Copy link
Contributor Author

kived commented Feb 26, 2016

Use the android_new target in buildozer instead of android - i.e. buildozer android_new debug deploy run. You may need to upgrade to the latest dev version of buildozer - sudo pip install https://github.com/kivy/buildozer/archive/master.zip

@sloisel
Copy link

sloisel commented Mar 2, 2016

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:

[...]
Successfully installed buildozer-0.32.dev0 pexpect-4.0.1 ptyprocess-0.5.1
Sebastiens-MBP:kivy sebastienloisel$ buildozer android_new debug deploy run

Check configuration tokens

Unknown command/target android_new

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:

[...]
In file included from /home/kivy/kivy/.buildozer/android/platform/python-for-android/src/jni/../jni/sdl/src/video/android/SDL_pixels.c:35:0:
/home/kivy/kivy/.buildozer/android/platform/python-for-android/src/jni/../jni/sdl/src/video/android/SDL_blit.h:1:1: error: expected identifier or '(' before '.' token
[...]

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.

@sloisel
Copy link

sloisel commented Mar 2, 2016

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
configure: error: in `/Users/sebastienloisel/Library/Application Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2':
configure: error: C compiler cannot create executables

:(

Edit: I've located the log file:

configure:3565: $? = 0
configure:3554: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platfo
rms/android-19/arch-arm -V >&5
arm-linux-androideabi-gcc: error: unrecognized command line option '-V'
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
configure:3565: $? = 1
configure:3554: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -qversion >&5
arm-linux-androideabi-gcc: error: unrecognized command line option '-qversion'
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
configure:3565: $? = 1
configure:3585: checking whether the C compiler works
configure:3607: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -DNO_MALLINFO -lm -L/Users/sebastienloisel/Library/Application Support/python-for-android/build/libs_collections/myapp/armeabi-v7a conftest.c >&5
arm-linux-androideabi-gcc: error: Support/python-for-android/build/libs_collections/myapp/armeabi-v7a: No such file or directory
configure:3611: $? = 1
configure:3649: result: no
configure: failed program was:
| /* confdefs.h _/
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _BSD_TYPES 1
| #define DARWIN_C_SOURCE 1
| /
end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3654: error: in `/Users/sebastienloisel/Library/Application Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2':
configure:3656: error: C compiler cannot create executables

@akshayaurora
Copy link
Member

@sébastien Loisel paste the entire log

On Wed, Mar 2, 2016 at 10:43 PM, Sébastien Loisel [email protected]
wrote:

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 #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
configure: error: in `/Users/sebastienloisel/Library/Application
Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2':
configure: error: C compiler cannot create executables

:(


Reply to this email directly or view it on GitHub
#653 (comment)
.

@afish8ben
Copy link

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

@sloisel
Copy link

sloisel commented Mar 2, 2016

Which log, this one? There are logs all over!

Sebastiens-MBP:kivy sebastienloisel$ cat !$
cat '/Users/sebastienloisel/Library//Application Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2/config.log'
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by python configure 2.7, which was
generated by GNU Autoconf 2.68.  Invocation command line was

  $ ./configure --host=arm-eabi --build=x86_64-apple-darwin15.3.0 --prefix=/Users/sebastienloisel/Library/Application Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2/python-install --enable-shared --disable-toolbox-glue --disable-framework

## --------- ##
## Platform. ##
## --------- ##

hostname = Sebastiens-MBP
uname -m = x86_64
uname -r = 15.3.0
uname -s = Darwin
uname -v = Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = Mach kernel version:
     Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 293 tasks, 1349 threads, 4 processors
Load average: 3.99, Mach factor: 1.03
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86/bin/
PATH: /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/
PATH: /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c
PATH: /Users/sebastienloisel/.buildozer/android/platform/android-sdk-20/tools
PATH: /Users/sebastienloisel/.buildozer/android/platform/apache-ant-1.9.4/bin
PATH: /Users/sebastienloisel/torch/install/bin
PATH: /Users/sebastienloisel/.opam/system/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/X11/bin
PATH: /Library/TeX/texbin
PATH: /Users/sebastienloisel/Library/Android/sdk/platform-tools


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2764: checking for --enable-universalsdk
configure:2805: result: no
configure:2814: checking for --with-universal-archs
configure:2831: result: 32-bit
configure:2988: checking MACHDEP
configure:3136: result: darwin
configure:3142: checking EXTRAPLATDIR
configure:3157: result: $(PLATMACDIRS)
configure:3168: checking machine type as reported by uname -m
configure:3171: result: x86_64
configure:3184: checking for --without-gcc
configure:3228: result: no
configure:3249: checking for arm-eabi-gcc
configure:3276: result: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm
configure:3545: checking for C compiler version
configure:3554: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm --version >&5
arm-linux-androideabi-gcc (GCC) 4.8
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3565: $? = 0
configure:3554: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -v >&5
Using built-in specs.
COLLECT_GCC=arm-linux-androideabi-gcc
COLLECT_LTO_WRAPPER=/Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/../libexec/gcc/arm-linux-androideabi/4.8/lto-wrapper
Target: arm-linux-androideabi
Configured with: /s/ndk-toolchain/src/build/../gcc/gcc-4.8/configure --prefix=/tmp/ndk-User/build/toolchain/prefix --target=arm-linux-androideabi --host=x86_64-apple-darwin --build=x86_64-apple-darwin --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/tmp/ndk-User/build/toolchain/temp-install --with-mpfr=/tmp/ndk-User/build/toolchain/temp-install --with-mpc=/tmp/ndk-User/build/toolchain/temp-install --with-cloog=/tmp/ndk-User/build/toolchain/temp-install --with-isl=/tmp/ndk-User/build/toolchain/temp-install --with-ppl=/tmp/ndk-User/build/toolchain/temp-install --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -lstdc++ -lm' --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-initfini-array --disable-nls --prefix=/tmp/ndk-User/build/toolchain/prefix --with-sysroot=/tmp/ndk-User/build/toolchain/prefix/sysroot --with-binutils-version=2.23 --with-mpfr-version=3.1.1 --with-mpc-version=1.0.1 --with-gmp-version=5.0.5 --with-gcc-version=4.8 --with-gdb-version=7.3.x --with-python=/Users/User/mydroid/ndk/prebuilt/darwin-x86_64/bin/python-config.sh --with-gxx-include-dir=/tmp/ndk-User/build/toolchain/prefix/include/c++/4.8 --with-bugurl=http://source.android.com/source/report-bugs.html --disable-bootstrap --disable-libquadmath --enable-plugins --enable-libgomp --disable-libsanitizer --enable-gold --enable-graphite=yes --with-cloog-version=0.18.0 --with-isl-version=0.11.1 --enable-eh-frame-hdr-for-static --with-arch=armv5te --program-transform-name='s&^&arm-linux-androideabi-&' --enable-gold=default
Thread model: posix
gcc version 4.8 (GCC) 
configure:3565: $? = 0
configure:3554: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -V >&5
arm-linux-androideabi-gcc: error: unrecognized command line option '-V'
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
configure:3565: $? = 1
configure:3554: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -qversion >&5
arm-linux-androideabi-gcc: error: unrecognized command line option '-qversion'
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
configure:3565: $? = 1
configure:3585: checking whether the C compiler works
configure:3607: arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -DNO_MALLINFO  -lm -L/Users/sebastienloisel/Library/Application Support/python-for-android/build/libs_collections/myapp/armeabi-v7a conftest.c  >&5
arm-linux-androideabi-gcc: error: Support/python-for-android/build/libs_collections/myapp/armeabi-v7a: No such file or directory
configure:3611: $? = 1
configure:3649: result: no
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _BSD_TYPES 1
| #define _DARWIN_C_SOURCE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3654: error: in `/Users/sebastienloisel/Library/Application Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2':
configure:3656: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=set
ac_cv_env_CC_value='arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -DNO_MALLINFO'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-lm -L/Users/sebastienloisel/Library/Application Support/python-for-android/build/libs_collections/myapp/armeabi-v7a'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-apple-darwin15.3.0
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=arm-eabi
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_CC='arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm'

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='arm-linux-androideabi-ar'
ARCH_RUN_32BIT=''
ARFLAGS=''
BASECFLAGS=''
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC='arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm'
CCSHARED=''
CFLAGS='-DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -DNO_MALLINFO'
CFLAGSFORSHARED=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=' '\''--host=arm-eabi'\'' '\''--build=x86_64-apple-darwin15.3.0'\'' '\''--prefix=/Users/sebastienloisel/Library/Application Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2/python-install'\'' '\''--enable-shared'\'' '\''--disable-toolbox-glue'\'' '\''--disable-framework'\'' '\''build_alias=x86_64-apple-darwin15.3.0'\'' '\''host_alias=arm-eabi'\'' '\''CC=arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm'\'' '\''CFLAGS=-DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -DNO_MALLINFO'\'' '\''LDFLAGS=-lm -L/Users/sebastienloisel/Library/Application Support/python-for-android/build/libs_collections/myapp/armeabi-v7a'\'''
CPP=''
CPPFLAGS=''
CXX='arm-linux-androideabi-g++ -DANDROID -mandroid -fomit-frame-pointer --sysroot /Users/sebastienloisel/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm'
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
EXTRAMACHDEPPATH='$(PLATMACPATH)'
EXTRAPLATDIR='$(PLATMACDIRS)'
FRAMEWORKALTINSTALLFIRST=''
FRAMEWORKALTINSTALLLAST=''
FRAMEWORKINSTALLAPPSPREFIX=''
FRAMEWORKINSTALLFIRST=''
FRAMEWORKINSTALLLAST=''
FRAMEWORKUNIXTOOLSPREFIX='/Users/sebastienloisel/Library/Application Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2/python-install'
GNULD=''
GREP=''
HAS_HG=''
HAVE_GETHOSTBYNAME=''
HAVE_GETHOSTBYNAME_R=''
HAVE_GETHOSTBYNAME_R_3_ARG=''
HAVE_GETHOSTBYNAME_R_5_ARG=''
HAVE_GETHOSTBYNAME_R_6_ARG=''
HGBRANCH=''
HGTAG=''
HGVERSION=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTSONAME=''
LDCXXSHARED=''
LDFLAGS='-lm -L/Users/sebastienloisel/Library/Application Support/python-for-android/build/libs_collections/myapp/armeabi-v7a'
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LIBC=''
LIBFFI_INCLUDEDIR=''
LIBM=''
LIBOBJS=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LIPO_32BIT_FLAGS=''
LN=''
LTLIBOBJS=''
MACHDEP='darwin'
MACHDEP_OBJS=''
MAINCC=''
OBJEXT=''
OPT=''
OTHER_LIBTOOL_OPT=''
PACKAGE_BUGREPORT='http://bugs.python.org/'
PACKAGE_NAME='python'
PACKAGE_STRING='python 2.7'
PACKAGE_TARNAME='python'
PACKAGE_URL=''
PACKAGE_VERSION='2.7'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PYTHONFRAMEWORK=''
PYTHONFRAMEWORKDIR='no-framework'
PYTHONFRAMEWORKIDENTIFIER='org.python.python'
PYTHONFRAMEWORKINSTALLDIR=''
PYTHONFRAMEWORKPREFIX=''
RANLIB='arm-linux-androideabi-ranlib'
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/sh'
SHLIBS=''
SIGNAL_OBJS=''
SO=''
SOVERSION='1.0'
SRCDIRS=''
SVNVERSION=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNICODE_OBJS=''
UNIVERSALSDK=''
UNIVERSAL_ARCH_FLAGS=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='2.7'
ac_ct_CC=''
bindir='${exec_prefix}/bin'
build_alias='x86_64-apple-darwin15.3.0'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias='arm-eabi'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/Users/sebastienloisel/Library/Application Support/python-for-android/build/other_builds/python2/armeabi-v7a/python2/python-install'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define _GNU_SOURCE 1
#define _NETBSD_SOURCE 1
#define __BSD_VISIBLE 1
#define _BSD_TYPES 1
#define _DARWIN_C_SOURCE 1

configure: exit 77
Sebastiens-MBP:kivy sebastienloisel$ 

@akshayaurora
Copy link
Member

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]
wrote:

I'm having the same issue as @sloisel https://github.com/sloisel

This looks suspicious: arm-linux-androideabi-gcc: error:
Support/python-for-android/build/libs_collections/myapp/armeabi-v7a: No
such file or directory


Reply to this email directly or view it on GitHub
#653 (comment)
.

@inclement
Copy link
Member

@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.

@kived
Copy link
Contributor Author

kived commented Mar 2, 2016

@sloisel @afish8ben You are talking about a known issue (#622), and is unrelated to this issue.

@afish8ben
Copy link

@kived indeed thanks.

@inclement
Copy link
Member

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?

@sloisel
Copy link

sloisel commented Mar 2, 2016

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:

http://www.macs.hw.ac.uk/~sl398/bonked.txt

@aptly-io
Copy link

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 android_new (as per your suggestion) but don't get it buildozer-ed (same versions as mentioned. NDK=10e) (see output after logcat). Each time doing rm -rf ~/.buildozer ./.buildozer bin before doing a buildozer init ; buildozer --verbose android_new debug.
Some mitigation suggestion to get it build for android_new?

Logcat:

D/dalvikvm(18987): Added shared lib /data/app-lib/org.test.myapp-2/libsdl_mixer.so 0x4276ca40
D/dalvikvm(18987): No JNI_OnLoad found in /data/app-lib/org.test.myapp-2/libsdl_mixer.so 0x4276ca40, skipping init
D/dalvikvm(18987): Trying to load lib /data/app-lib/org.test.myapp-2/libpython2.7.so 0x4276ca40
I/Mms/MmsApp(18955):  start initViewCache mms
E/dalvikvm(18987): dlopen("/data/app-lib/org.test.myapp-2/libpython2.7.so") failed: dlopen failed: cannot locate symbol "pow" referenced by "libpython2.7.so"...
W/dalvikvm(18987): threadid=11: thread exiting with uncaught exception (group=0x41b93700)
E/AndroidRuntime(18987): FATAL EXCEPTION: Thread-41465
E/AndroidRuntime(18987): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "pow" referenced by "libpython2.7.so"...
E/AndroidRuntime(18987):    at java.lang.Runtime.loadLibrary(Runtime.java:362)
E/AndroidRuntime(18987):    at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
E/AndroidRuntime(18987):    at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
E/AndroidRuntime(18987):    at java.lang.Runtime.loadLibrary(Native Method)
E/AndroidRuntime(18987):    at java.lang.System.loadLibrary(System.java:525)
E/AndroidRuntime(18987):    at org.renpy.android.PythonActivity.run(PythonActivity.java:254)
E/AndroidRuntime(18987):    at java.lang.Thread.run(Thread.java:841)

Output when building with android_new:

# 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

@inclement
Copy link
Member

Your android_new error indicates that you need to install the sh module.

On 13/03/16 20:40, aptly-io wrote:

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 https://github.com/kived Also tried |android_new| (as per your
suggestion) but don't get it /buildozer-ed/ (same versions as mentioned.
NDK=10e) (see output after |logcat|). Each time doing |rm -rf
~/.buildozer ./.buildozer bin| before doing a |buildozer init ;
buildozer --verbose android_new debug|.
Some mitigation suggestion to get it build for |android_new|?

Logcat:

|D/dalvikvm(18987): Added shared lib
/data/app-lib/org.test.myapp-2/libsdl_mixer.so 0x4276ca40
D/dalvikvm(18987): No JNI_OnLoad found in
/data/app-lib/org.test.myapp-2/libsdl_mixer.so 0x4276ca40, skipping init
D/dalvikvm(18987): Trying to load lib
/data/app-lib/org.test.myapp-2/libpython2.7.so 0x4276ca40
I/Mms/MmsApp(18955): start initViewCache mms E/dalvikvm(18987):
dlopen("/data/app-lib/org.test.myapp-2/libpython2.7.so") failed: dlopen
failed: cannot locate symbol "pow" referenced by "libpython2.7.so"...
W/dalvikvm(18987): threadid=11: thread exiting with uncaught exception
(group=0x41b93700) E/AndroidRuntime(18987): FATAL EXCEPTION:
Thread-41465 E/AndroidRuntime(18987): java.lang.UnsatisfiedLinkError:
dlopen failed: cannot locate symbol "pow" referenced by
"libpython2.7.so"... E/AndroidRuntime(18987): at
java.lang.Runtime.loadLibrary(Runtime.java:362) E/AndroidRuntime(18987):
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native
Method) E/AndroidRuntime(18987): at
de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
E/AndroidRuntime(18987): at java.lang.Runtime.loadLibrary(Native Method)
E/AndroidRuntime(18987): at
java.lang.System.loadLibrary(System.java:525) E/AndroidRuntime(18987):
at org.renpy.android.PythonActivity.run(PythonActivity.java:254)
E/AndroidRuntime(18987): at java.lang.Thread.run(Thread.java:841) |

Output when building with |android_new|:

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
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


Reply to this email directly or view it on GitHub
#653 (comment).

@aptly-io
Copy link

@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)
I notice OSX' python does not have sh:

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

@inclement
Copy link
Member

Buildozer does not currently install all of the dependencies of the new
p4a toolchain. You need to install the sh module yourself, e.g. via pip.

On 13/03/16 20:49, aptly-io wrote:

@inclement https://github.com/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)
I notice OSX' python does not have sh:

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 "", line 1, in
ImportError: No module named sh


Reply to this email directly or view it on GitHub
#653 (comment).

@aptly-io
Copy link

@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 IOS Android is a bit broken/untested for the moment? A pity ...

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

@inclement
Copy link
Member

What does building for ios have to do with this? This is about
python-for-android.

I thought this error was fixed in the master branch quite a few days
ago. When did you download python-for-android? Did you first try
android_new some time ago?

On 13/03/16 21:02, aptly-io wrote:

@inclement https://github.com/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 IOS is a bit broken/untested
for the moment? A pity ...

[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
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


Reply to this email directly or view it on GitHub
#653 (comment).

@aptly-io
Copy link

@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)

@aptly-io
Copy link

@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.

@Vagelis-Prokopiou
Copy link

Vagelis-Prokopiou commented May 17, 2016

I am having the same problem. The app crashes when it is launched. I also tried buildozer android_new debug, but the result was the same. The build is done on a Debian 8 system. I am really struggling to debug this, since I see no log files either. E.g.:

va@debian:~$ find ./.buildozer/ -iname "*.log*" returns
./.buildozer/android/platform/android-ndk-r9c/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal
va@debian:~$ find serviceApp/ -iname "*.log*", returns nothing.
The source code of the app is here: https://github.com/Vaggos/serviceApp/tree/feature/gui_Python2.7/gui

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:

[INFO ] Logger: Record log in /storage/sdcard0/kivy/serviceapp/.kivy/logs/kivy_16-05-18_0.txt [WARNING ] [Config ] Upgrading configuration in progress. [WARNING ] [Config ] Older configuration version detected (0 instead of 14) [ERROR ] Error when copying logo directory [INFO ] Kivy: v1.9.1 [INFO ] Python: v2.7.2 (default, Mar 20 2016, 23:30:13) [GCC 4.8] [INFO ] Factory: 179 symbols loaded [WARNING ] stderr: /data/data/org.kivy.pygame/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:13: RuntimeWarning: import cdrom: No module named cdrom [WARNING ] stderr: (ImportError: No module named cdrom) [INFO ] Image: Providers: img_tex, img_dds, img_gif, img_pygame, img_pil (img_ffpyplayer ignored) [WARNING ] stderr: Traceback (most recent call last): [WARNING ] stderr: File "main.py", line 8, in <module> [WARNING ] stderr: import csv [WARNING ] stderr: File "/home/tito/code/python-for-android-upstream/build/python-install/lib/python2.7/csv.py", line 8, in <module> [WARNING ] stderr: ImportError: No module named _csv

I search a little and I found this issue: #54.

I commented out the csv and cdrom modules in the "blacklist.txt" (there are a couple of them in the .buildozer folder) in order for them to be included in the build.

I build the app again, and it works.

@frankgould
Copy link

frankgould commented Oct 1, 2016

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?

@inclement
Copy link
Member

Kivy is not dead, just that link. I'll remove it from the doc (I'm not
sure if we host it anywhere any more). I can't comment on what was wrong
without more information - what folder structure did you use exactly?.

If you think there is an issue with the launcher, please post this
information in a new github issue, this old one is about a specific
technical problem.

On 01/10/16 15:26, Frank wrote:

I couldn't get the Kivy launcher apk to work. Kept saying "put the
project in /mnt/installation_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?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#653 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABNQm9XJZ9QTiCPF13vC40EORzw6SRkdks5qvm19gaJpZM4Hj_Eo.

@frankgould
Copy link

Update: Typo, the folder I put my kivy main.py/android.txt project into was /mnt/internal_sd/kivy.

@WillyWinkel
Copy link

WillyWinkel commented Nov 13, 2016

Same Problem with OSX 10.11.6 and LenovoTAB2A8.
@Vaggos tried to comment out cd and cdrom but it did help neither android or android_new.

Update:

Adding python2 to the requirements in buildozer.spec helps for me, see SO.

@szech696
Copy link

szech696 commented Dec 5, 2016

Hey Guys easy fix, you need to have a main.py file

@AllieCarver
Copy link

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 dlopen("/data/app-lib/org.test.myapp-2/libpython2.7.so") failed: dlopen failed: cannot locate symbol "pow" referenced by "libpython2.7.so". Solution as @kived suggests in the comments above is to build with android_new. After that all I had to do was install a couple python packages (listed in the buildozer error logs) and add hostpython2 to my buildozer.spec requirements(found this last part in separate closed issue after initially failing to build again.

@Settheworldonfireiii
Copy link

@kived so did U fix the issue with

Starting: Intent { act=org.renpy.android.PythonActivity cmp=org.test.myapp/org.renpy.android.PythonActivity }
Error type 3
Error: Activity class {org.test.myapp/org.renpy.android.PythonActivity} does not exist.

@raydatascience
Copy link

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
PS2. I am using python 3.6.2 with Pycharm IDE on Win 10
buildozer.txt
logcat.txt

@inclement
Copy link
Member

@raythenewuser Please stop spamming old issues with your problem, opening a new issue (as you already have) is sufficient and appropriate.

@raydatascience
Copy link

Ok, sorry abt that

@Muzingaye-Nkala
Copy link

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..

@Scotty2002
Copy link

I had the same problem and how i fix my is i save my python script as main.py n it works.

@inclement
Copy link
Member

Closing as stale, I think the underlying issues with linking and loading libraries have been fixed.

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

No branches or pull requests