Application hang on Android
-
Hello,
I've successfully built an application for Android using Qt 5.11 and android-21 as API level. I've generated the application using QMake with the following project.pro and main.cpp file:
QT += widgets SOURCES += src/main.cpp
And main.cpp:
#include <QApplication> #include <QGraphicsView> int main(int argc, char** argv) { QApplication app(argc, argv); QGraphicsView view; view.show(); return app.exec(); }
The application builds and deploy correctly to the real android device (oneplus 5t) but hangs, my phone tells the application does not respond and ask me to quit/wait for it. It does the same on x86 and x86_64 architectures in Android Emulator. Strangely, in android emulator it works in armeabi-v7a.
In Qt creator, the following Application output is shown:
I zygote64: Late-enabling -Xcheck:jni I zygote64: The ClassLoaderContext is a special shared library. D Embryo : preload org.qtproject.example.save_the_ball, 20ms, hwui=true, layout=false, decor=false V Font : Change font:2 W System : ClassLoader referenced unknown path: I Qt : qt started D OpenGLRenderer: HWUI GL Pipeline I zygote64: Do partial code cache collection, code=30KB, data=21KB I zygote64: After code cache collection, code=29KB, data=21KB I zygote64: Increasing code cache capacity to 128KB I zygote64: Do partial code cache collection, code=61KB, data=48KB I zygote64: After code cache collection, code=61KB, data=48KB I zygote64: Increasing code cache capacity to 256KB I zygote64: Compiler allocated 5MB to compile org.json.JSONObject org.qtproject.qt5.android.ExtractStyle.extractTextAppearanceInformations(java.lang.String, java.lang.String, android.util.AttributeSet, int) I zygote64: Do full code cache collection, code=124KB, data=88KB I zygote64: After code cache collection, code=111KB, data=68KB I Adreno : QUALCOMM build : fcdb932, I1513509751 I Adreno : Build Date : 01/22/18 I Adreno : OpenGL ES Shader Compiler Version: EV031.22.00.01 I Adreno : Local Branch : I Adreno : Remote Branch : I Adreno : Remote Branch : I Adreno : Reconstruct Branch : D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace. I Adreno : PFP: 0x005ff087, ME: 0x005ff063 I zygote64: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 I QtCore : Start I OpenGLRenderer: Initialized EGL, version 1.4 D OpenGLRenderer: Swap behavior 2 D libGLESv1: Successfully load libGLESv2_oneplus.so, this=0x7fa796d008 D OpenGLRenderer: Successfully load libhwui_plugin.so, this=0x7fa597f558 I zygote64: Thread[3,tid=8423,WaitingInMainSignalCatcherLoop,Thread*=0x7f254c4400,peer=0x12d80088,"Signal Catcher"]: reacting to signal 3 06-07 12:21:08.369 8409 8423 I zygote64: E zygote64: # HandleSigQuit # DumpForSigQuit # before # pid=8409 E zygote64: # HandleSigQuit # DumpForSigQuit # after # pid=8409 I zygote64: Wrote stack traces to '[tombstoned]' "org.qtproject.example.save_the_ball" died.
-
Hi @David-Demelier ,
The application builds and deploy correctly to the real android device (oneplus 5t) but hangs, my phone tells the application does not respond and ask me to quit/wait for it. It does the same on x86 and x86_64 architectures in Android Emulator. Strangely, in android emulator it works in armeabi-v7a.
You haven't stated for what cpu architecture you compile your app for, but from that quote up there my guess would be you compile your app for x86 and, looking at the onePlus cpu specks, all OnePlus deviced run ARM64-cpus
change your compiler and associated Qt libary to arm v7 and you should be good to go.
-
For my oneplus 5t I use arm64-v8a, it works without problem using armeabi-v7a though :)
Thanks!