jianglei12138 / python2.7

python2.7 for android
Other
1 stars 0 forks source link

cannot locate symbol #1

Open viperfx opened 8 years ago

viperfx commented 8 years ago

When I launch the app, it immediately crashes. I got the follow message from logcat:

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "SSL_CTX_callback_ctrl" referenced by "/data/app/com.example.pythontest-2/lib/arm/libpython2.7.so"...

Here is the full trace

05-17 21:24:09.890 9089-9089/com.example.pythontest I/art: Late-enabling -Xcheck:jni
05-17 21:24:09.927 9089-9096/com.example.pythontest E/art: Failed sending reply to debugger: Broken pipe
05-17 21:24:09.927 9089-9096/com.example.pythontest I/art: Debugger is no longer active
05-17 21:24:13.264 9089-9089/com.example.pythontest D/AndroidRuntime: Shutting down VM

                                                                      --------- beginning of crash
05-17 21:24:13.267 9089-9089/com.example.pythontest E/AndroidRuntime: FATAL EXCEPTION: main
                                                                      Process: com.example.pythontest, PID: 9089
                                                                      java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "SSL_CTX_callback_ctrl" referenced by "/data/app/com.example.pythontest-2/lib/arm/libpython2.7.so"...
                                                                          at java.lang.Runtime.loadLibrary(Runtime.java:372)
                                                                          at java.lang.System.loadLibrary(System.java:1076)
                                                                          at com.example.pythontest.MainActivity.<clinit>(MainActivity.java:17)
                                                                          at java.lang.Class.newInstance(Native Method)
                                                                          at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
                                                                          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
                                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
                                                                          at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                          at android.os.Looper.loop(Looper.java:148)
                                                                          at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                          at java.lang.reflect.Method.invoke(Native Method)
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
jianglei12138 commented 8 years ago

In several recent vesion,android used BoringSSL instead of OpenSSL, so it was caused by the different SSL. So you should build python for different version of android, and load the correct library based on the android version. And i have tried build python used the static libray of libssl and libcrypto, but i failed !