Python for android and Django

33 views
Skip to first unread message

Marcin Kozubała

unread,
Aug 1, 2017, 2:40:03 AM8/1/17
to Python For Android
Hi all,
I try to make a simple apk with django.
I use following command. 

python-for-android apk --ndk-dir /home/mk/Pulpit/kivy/crystax-ndk-10.3.2 --requirements=python3crystax,sqlite3,django --bootstrap=webview --port=8000 --android_api=19 --name=djTest--version=0.1 --package=com.mk.dj 

Apk is created but when I run it webview does not start. I think i'm missing something. Can you help me?
Thanks,

Marcin Kozubała

unread,
Aug 1, 2017, 11:30:50 AM8/1/17
to Python For Android

UPDATE
logcat:

08-01 17:19:46.668  7712  7776 I python  : Initialized python
08-01 17:19:46.668  7712  7776 I python  : AND: Init threads
08-01 17:19:46.668  7712  7776 I python  : testing python print redirection
08-01 17:19:46.670  7712  7776 I python  : Android path ['.', '/data/user/0/com.kozubi.dj/files/crystax_python/stdlib.zip', '/data/user/0/com.kozubi.dj/files/crystax_python/modules', '/data/user/0/com.kozubi.dj/files/crystax_python/site-packages']
08-01 17:19:46.670  7712  7776 I python  : os.environ is environ({'ANDROID_DATA': '/data', 'PYTHON_NAME': 'python', 'ASEC_MOUNTPOINT': '/mnt/asec', 'ANDROID_STORAGE': '', 'ANDROID_ENTRYPOINT': 'main.pyo', 'BOOTCLASSPATH': '/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/apache-xml.jar:/system/framework/org.apache.http.legacy.boot.jar:/system/framework/hwEmui.jar:/system/framework/hwTelephony-common.jar:/system/framework/hwframework.jar:/system/framework/org.simalliance.openmobileapi.jar:/system/framework/hwaps.jar:/system/framework/hwcustEmui.jar:/system/framework/hwcustTelephony-common.jar:/system/framework/hwcustframework.jar:/system/framework/VireCustomFramework.jar', 'ANDROID_BOOTLOGO': '1', 'ANDROID_ROOT': '/system', 'SYSTEMSERVERCLASSPATH': '/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar:/system/framework/hwServices.jar:/system/framework/hwWifi-service.jar:/system/framework/hwcustServices.jar:/system/framework/hwcustwifi-service.jar', 'ANDROID_PROPERTY_WORKSPACE': '11,0', 'EXTERNAL_STORAGE': '/sdcard', 'ANDROID_SOCKET_zygote_secondary': '12', 'PATH': '/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin', 'PYTHONPATH': '/data/user/0/com.kozubi.dj/files:/data/user/0/com.kozubi.dj/files/lib', 'ANDROID_ARGUMENT': '/data/user/0/com.kozubi.dj/files', 'PYTHONHOME': '/data/user/0/com.kozubi.dj/files', 'ANDROID_APP_PATH': '/data/user/0/com.kozubi.dj/files', 'ANDROID_PRIVATE': '/data/user/0/com.kozubi.dj/files', 'CUST_POLICY_DIRS': '/system/emui/base:/system/emui/oversea:/system/emui:/system/global:/system/etc:/cust_comm', 'ANDROID_ASSETS': '/system/app'})
08-01 17:19:46.670  7712  7776 I python  : Android kivy bootstrap done. __name__ is __main__
08-01 17:19:46.670  7712  7776 I python  : AND: Ran string
08-01 17:19:46.670  7712  7776 I python  : Run user program, change dir and execute entrypoint
08-01 17:19:46.670  7712  7776 I python  : main.py
08-01 17:19:46.670  7712  7776 I python  : Entrypoint not found (.pyo, fallback on .py), abort

What is this "entrypoint"?
Reply all
Reply to author
Forward
0 new messages