Kivy webview 前几天发有一个抄来的源码,是可以正常加载网页,但是是全屏的,而且不能返回。
搜遍了google和gayhub,整合了几套源码,折腾出来了。
效果如下图,这里就不上代码了。请移步到我的 gayhub https://github.com/xiaoyaoking/kivy-android-webview
如果无法加载图片,图片地址: https://github.com/xiaoyaoking/kivy-android-webview/blob/master/Test%20Screenshot.png?raw=true
从github下的kivy-android-webview打包后运行闪退,查看日志显示class not found ‘com/xiaoyaoking/WebviewEngine/CustomWebviewClient’.而用你打包的那个确正常。请问是什么原因?
–dist_name py2dist
–android_api 23
–sdk_dir /home/kivydev/andr/android-sdk-linux
#–ndk_dir /home/kivydev/andr/android-ndk-r10e
–ndk_dir /home/kivydev/andr/android-ndk-r16b
–ndk_version r13
–icon /home/kivydev/work/xyapp/res/10.png
–presplash /home/kivydev/work/xyapp/res/10.png
–add-source=/home/kivydev/work/xyapp/src/java_classes/com/xiaoyaoking/
–requirements pyjnius,python2,kivy,sdl2_mixer,android
–private src
–package com.xiaoyaoking.xyapp
–name xyapp
–version 1.0
–bootstrap sdl2
–arch armeabi-v7a
–copy-libs
–window
–permission INTERNET
–permission DELETE_CACHE_FILES
–permission VIBRATE
–permission ACCESS_WIFI_STATE
–permission CHANGE_WIFI_STATE
–permission CHANGE_NETWORK_STATE
.p4a唯一改过的就是ndk_dir /home/kivydev/andr/android-ndk-r16b