Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Application won't start on Android with Qt 5.15



  • Hi,

    I'd like to update from Qt 5.13.x to Qt 5.15, but my application won't start anymore with this release. I removed almost all Java code and external dependencies to identify the problem, but it still crashes right after start with these debug messages:

    I cz.jech.muzika: Late-enabling -Xcheck:jni
    W System  : ClassLoader referenced unknown path:
    D OpenGLRenderer: Skia GL Pipeline
    I QtCore  : Start
    I Qt      : qt started
    W System.err: java.lang.Exception:
    W System.err: 	at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:268)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266)
    W System.err: 	at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273)
    W System.err: 	at cz.jech.muzdev.Player.onCreate(Player.java:13)
    W System.err: 	at android.app.Activity.performCreate(Activity.java:7148)
    W System.err: 	at android.app.Activity.performCreate(Activity.java:7139)
    W System.err: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1293)
    W System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3111)
    W System.err: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3270)
    W System.err: 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
    W System.err: 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    W System.err: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    W System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1986)
    W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
    W System.err: 	at android.os.Looper.loop(Looper.java:215)
    W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6939)
    W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
    W System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
    D Muzika  : onCreate: null
    I Adreno  : QUALCOMM build                   : cf6f28e, I1fbdd7a9d4
    I Adreno  : Build Date                       : 02/28/19
    I Adreno  : OpenGL ES Shader Compiler Version: EV031.25.03.02
    I Adreno  : Local Branch                     : mybranche93b5c3a-ead7-f1e6-b2ac-5cb90179c3e0
    I Adreno  : Remote Branch                    : quic/gfx-adreno.lnx.1.0.r49-rel
    I Adreno  : Remote Branch                    : NONE
    I Adreno  : Reconstruct Branch               : NOTHING
    I Adreno  : Build Config                     : S L 6.0.7 AArch64
    D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace.
    I Adreno  : PFP: 0x005ff112, ME: 0x005ff066
    I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
    I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
    I OpenGLRenderer: Initialized EGL, version 1.4
    D OpenGLRenderer: Swap behavior 2
    D vndksupport: Loading /vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
    D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace.
    

    The Player.java code has been stripped to this:

    import android.content.Context;
    import android.content.Intent;
    import android.os.Bundle;
    import android.util.Log;
    import org.qtproject.qt5.android.bindings.QtActivity;
    
    public class Player extends QtActivity {
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            Log.d("Muzika", "onCreate: "+savedInstanceState);
        }
    
        @Override
        protected void onDestroy() {
            super.onDestroy();
            Log.d("Muzika", "onDestroy, service bound: ");
        }
    
        public static void startPlayerService(Context ctx) {
            Log.d("Muzika", "Called start service, context: "+ctx);
            ctx.startService(new Intent(ctx, PlayerService.class));
        }
    }
    

    As you can see on the line 13, which is mentioned in the debug window, is the call to super.onCreate(savedInstanceState);

    So the problem shouldn't be within my Java code.

    I replaced the AndroidManifest.xml with a new one a copied the needed modifications back from my previous version. I'm now stuck and have no idea where to look further and how could I identify the root cause of the crash.

    Do you have any idea? Thank you.


  • Qt Champions 2016

    so you replaced the Manifest - do you have recreated all the other stuff (gradle etc) from 'Create Templates' ?



  • Yes, I have used the "Create templates" button and just modified the AndroidManifest.xml to change name of my application, version etc.


  • Qt Champions 2016

    @vlada I'm still on 5.13.2 yet. have to finish a customer project before jumping to 5.15 - so no idea what could be the difference in your case


Log in to reply