Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QSGContext missing on Qt Android

I am developing an application for Android. The development is done on Linux, using Qt Creator with C++ and QML.

As I pulled off my hairs during the whole day and that thing doesn't seems too obvious, I wonder if anybody could have any clue about the error the debugger flushed out:

Could not load shared library symbols for 85 libraries, e.g. /system/bin/linker.

W/Qt      (24399): kernel/qcoreapplication.cpp:418
    (QCoreApplicationPrivate::QCoreApplicationPrivate(int&, char**, uint)): WARNING: QApplication was 
        not created in the main() thread.

D/libEGL  (24399): loaded /system/lib/egl/libEGL_tegra.so
D/libEGL  (24399): loaded /system/lib/egl/libGLESv1_CM_tegra.so
D/libEGL  (24399): loaded /system/lib/egl/libGLESv2_tegra.so
D/OpenGLRenderer(24399): Enabling debug mode 0
I/Choreographer(24399): Skipped 35 frames!  The application may be doing 
    too much work on its main thread.
D/Qt      (24399): qtcpserverconnection.cpp:173 (void QTcpServerConnection::listen()): QML Debugger:
    Waiting for connection on port 48309...
D/dalvikvm(24399): GC_CONCURRENT freed 396K, 6% free 7689K/8152K, paused 4ms+2ms, total 56ms

W/Qt      (24399): scenegraph/qsgcontext.cpp:440 (virtual void    
    QSGRenderContext::initialize(QOpenGLContext*)): QSGContext::initialize: 
           stencil buffer support missing, expect rendering errors

Is it a matter of some library missing or the Qt Creator is simply some how not properly linking the libraries?

like image 543
Judith Avatar asked Dec 20 '13 09:12

Judith


1 Answers

I came across some similar problem a while ago. What solved for me was instead of installing Qt5, simply build it from the source.

Here you find all the steps:

Build Qt 5 for Android

You have also to make all the setups to have your Kits working properly.

Keep in mind while Qt QML is the nice for most of Apps, if you decide to use some more specific feature from Android in you App you will be in trouble as it is still doesn't integrate 100% with Android API - e.g. Geofencing and others Google Maps capabilities. On such case, the way to go is still to use the Android SDK Java with JNI for your C++ code underneath it.

like image 86
Jessica Cohen Avatar answered Oct 18 '22 05:10

Jessica Cohen