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
I have a short, runnable example that reproduces the issue
I reproduced the problem with the latest development version (p4a.branch = develop)
I used the grave accent (aka backticks) to format code or logs when appropriated
Versions
Python: 3.6.6
OS: Ubuntu 20.04
python-for-android: 2020.6.2
Description
I'm building with:
HERE=$(pwd)
cd app
export ANDROIDSDK="$HERE/android_sdks"
# Have also tried with
# export ANDROIDNDK="$HERE/android_sdks/android-ndk-r19c"
export ANDROIDNDK="$HERE/android_sdks/android-ndk-r21d"
export ANDROIDAPI="27" # Target API version of your application
export NDKAPI="21" # Minimum supported API version of your application
p4a apk --private "." --package=org.anarres.pdfreader --name "pdf reader" --version 0.1 --bootstrap=webview --requirements=python3,flask --port=5000 --orientation=sensor --blacklist="../blacklist.txt" --permission READ_EXTERNAL_STORAGE --permission WRITE_EXTERNAL_STORAGE
My python code is just:
from android.permissions import request_permissions, Permission
request_permissions([Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE])
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
if __name__ == '__main__':
app.run(port=5000)
If I comment out:
from android.permissions import request_permissions, Permission
request_permissions([Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE])
I don't see the error, but then of course I can't access the external storage.
Logs
ImportError: dlopen failed: cannot locate symbol "SDL_ANDROID_GetJNIEnv" referenced by "/data/data/org.anarres.pdfreader/files/app/_python_bundle/site-packages/android/_android.so"...
The text was updated successfully, but these errors were encountered:
Seems the code in your linked _android.so library by some reason requests SDL_xxx functions while they are not built in, as your bootstrap is webview, and hence the code you built has no SDL functions in it
ImportError: dlopen failed: cannot locate symbol "WebView_AndroidGetJNIEnv" referenced by "/data/data/org.anarres.pdfreader/files/app/_python_bundle/site-packages/android/_android.so"...
Checklist
p4a.branch = develop
)Versions
Description
I'm building with:
My python code is just:
If I comment out:
I don't see the error, but then of course I can't access the external storage.
Logs
The text was updated successfully, but these errors were encountered: