安卓 7.0 Qt 5.8 网络模块不能正常工作



  • 当发出网络请求时,就会闪退

    @jcy @MidoriYakumo

    日志如下:

    W linker  : library "libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/org.qtproject.example.bitcoinworld_wallet_admin-1/lib/arm/libQt5Core.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120, note that the access will be removed in future releases of Android.
    W linker  : library "libssl.so" ("/system/lib/libssl.so") needed or dlopened by "/data/app/org.qtproject.example.bitcoinworld_wallet_admin-1/lib/arm/libQt5Core.so" is not accessible for the namespace "classloader-namespace" - the access is temporarily granted as a workaround for http://b/26394120, note that the access will be removed in future releases of Android.
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve CRYPTO_free
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve EVP_CipherFinal
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_ctrl
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve SSL_ctrl
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve EC_get_builtin_curves
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot resolve EC_curve_nist2nid
    W bitcoinworld-wallet-admin: (null):0 ((null)): qt.network.ssl: QSslSocket: cannot call unresolved function OPENSSL_add_all_algorithms_conf
    F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 28125 (QtThread)
    

    类似帖子:

    qnetworkrequest-not-working-on-qt-5-8-and-android-7-0

    @jcy



  • 一些参考资料 opensslsupport



  • QWebSocket for Android闪退问题

    在windows上编译openssl供Android NDK使用

    注意,网络上提供的 so 文件请仔细辨别,必要时,请自行编译!

    编译好的 libcrypto.solibssl.so 下载:QWebSocket-for-Android-openssl库

    @jcy @MidoriYakumo



  • @qyvlik 不清楚,因为我现在只有Android 4.4.4的设备,还没有Android 7.0的设备哦。这种手机太新了。





  • @qyvlik 谢谢分享哦,我吓得赶紧来膜拜一下,看看究竟是怎么回事。


Log in to reply
 

走马观花

最近的回复

  • 如果对操作不是很熟悉或者是操作不便的话,也可以在Windows的命令行执行NDK的安装。参数是一样的:
    Windows命令行安装NDK

    read more
  • 忘记补充图片了。这里需要点击更新安装才行。😆
    点击更新安装

    read more
  • 问:
    如何在Qt Creator安装NDK呢?
    除了那个🔽 按钮外,还有别的办法吗?
    答:
    Qt Creaator 4.11中更加整合了Android SDK Manager。其实大家都可以不运行默认的Android SDK Manager,直接在Qt Creator中选项->设备->Android,就可以进行操作了。

    通过````高级选项……,启动一些Android SDK Manager,只需要带上参数ndk-bundle```。原来没有NDK的你,也可以通过Android SDK Manager安装了。很简单吧。
    Android SDK Manager安装NDK

    read more
  • 挺好的分享,谢谢。1515759557.jpg

    read more

关注我们

微博
QQ群