pyjnius: App crashes if we use 'org.renpy.android.PythonActivity' in p4a new toolchain
If we use org.renpy.android.PythonActivity
(instead new org.kivy.android.PythonActivity
) in app built with p4a new toolchain it’ll crash. See this issue for example (there’s also typical log there):
W/PythonActivity(28456): Accessing org.renpy.android.PythonActivity is deprecated and will be removed in a future version. Please switch to org.kivy.android.PythonActivity.
F/art (28456): art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: static jfieldID 0x746c91a0 not valid for class java.lang.Class<org.renpy.android.PythonActivity>
F/art (28456): art/runtime/check_jni.cc:65] in call to GetStaticObjectField
F/art (28456): art/runtime/check_jni.cc:65] from int org.libsdl.app.SDLActivity.nativeInit(java.lang.Object)
F/art (28456): art/runtime/check_jni.cc:65] "SDLThread" prio=5 tid=15 Runnable
...
It can be temporary solved by replacing org.renpy.android.PythonActivity
with org.kivy.android.PythonActivity
everywhere in the code manually or with some dirty patch.
But correct solution would be to fix pyjnius
not to crash with org.renpy.android.PythonActivity
in p4a new toolchain.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (5 by maintainers)
It worked after changing
org.renpy.android
toorg.kivy.android
in the file you mentioned. Should I make a pull request for that? Or is there any reasonplyer
is still using the old value? Thanks for your help.Here’s a diff:
I’m at a loss for this one - it seems to match the example app at https://github.com/kivy/python-for-android/blob/master/testapps/testapp_flask/main.py, which does work for me.
On 10/03/17 18:49, Matous wrote: