You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While attempting to update a p4a project to the latest version, I discovered that the webview bootstrap is apparently no longer able to load org.jnius.NativeInvocationHandler, which breaks some jnius functionality like PythonJavaClass that our app relies on.
Here is a minimal sample with buildozer.spec and a main.py that shows the problem (the error message should show up in adb logcat logs):
This sample runs and does not give the error when using the SDL2 bootstrap.
Note also that the example uses the release-2019.10.06 branch of p4a because the latest master branch has an issue with webview bootstrap not having Python 3.8 support, and latest develop ran into an error in the p4a build scripts about a missing method. (Sorry, I forgot to copy it before running more tests and lost it.)
It does reproduce under latest master though with the Python 3.8 issue fixed, and on develop if using p4a commands to build instead of buildozer.
buildozer.spec
Command:
buildozer android debug deploy run
Spec file:
See attached zip.
Logs
04-13 20:50:14.669 23205 23254 I python : Android kivy bootstrap done. name is main
04-13 20:50:14.669 23205 23254 I python : AND: Ran string
04-13 20:50:14.669 23205 23254 I python : Run user program, change dir and execute entrypoint
04-13 20:50:14.757 23205 23254 I python : ERROR:root:Hello world!
04-13 20:50:14.779 23205 23254 I python : Traceback (most recent call last):
04-13 20:50:14.779 23205 23254 I python : File "/home/kevino/code/webview_sample/.buildozer/android/app/main.py", line 9, in
04-13 20:50:14.779 23205 23254 I python : File "/home/kevino/code/webview_sample/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/jnius/reflect.py", line 159, in autoclass
04-13 20:50:14.780 23205 23254 I python : File "jnius/jnius_export_func.pxi", line 26, in jnius.jnius.find_javaclass
04-13 20:50:14.780 23205 23254 I python : jnius.jnius.JavaException: Class not found b'org/jnius/NativeInvocationHandler'
04-13 20:50:14.780 23205 23254 I python : Python for android ended.
The text was updated successfully, but these errors were encountered:
👋 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.
Versions
Description
While attempting to update a p4a project to the latest version, I discovered that the webview bootstrap is apparently no longer able to load
org.jnius.NativeInvocationHandler
, which breaks some jnius functionality likePythonJavaClass
that our app relies on.Here is a minimal sample with buildozer.spec and a main.py that shows the problem (the error message should show up in
adb logcat
logs):jnius_webview.zip
This sample runs and does not give the error when using the SDL2 bootstrap.
Note also that the example uses the release-2019.10.06 branch of p4a because the latest master branch has an issue with webview bootstrap not having Python 3.8 support, and latest develop ran into an error in the p4a build scripts about a missing method. (Sorry, I forgot to copy it before running more tests and lost it.)
It does reproduce under latest master though with the Python 3.8 issue fixed, and on develop if using
p4a
commands to build instead of buildozer.buildozer.spec
Command:
buildozer android debug deploy run
Spec file:
See attached zip.
Logs
04-13 20:50:14.669 23205 23254 I python : Android kivy bootstrap done. name is main
04-13 20:50:14.669 23205 23254 I python : AND: Ran string
04-13 20:50:14.669 23205 23254 I python : Run user program, change dir and execute entrypoint
04-13 20:50:14.757 23205 23254 I python : ERROR:root:Hello world!
04-13 20:50:14.779 23205 23254 I python : Traceback (most recent call last):
04-13 20:50:14.779 23205 23254 I python : File "/home/kevino/code/webview_sample/.buildozer/android/app/main.py", line 9, in
04-13 20:50:14.779 23205 23254 I python : File "/home/kevino/code/webview_sample/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/jnius/reflect.py", line 159, in autoclass
04-13 20:50:14.780 23205 23254 I python : File "jnius/jnius_export_func.pxi", line 26, in jnius.jnius.find_javaclass
04-13 20:50:14.780 23205 23254 I python : jnius.jnius.JavaException: Class not found b'org/jnius/NativeInvocationHandler'
04-13 20:50:14.780 23205 23254 I python : Python for android ended.
The text was updated successfully, but these errors were encountered: