Qt Android activity creation problem on Java update
Unsolved
Mobile and Embedded
-
Hi All,
Apparently I am trying to upgrade development environment of my existing Qt project.
Original:
Qt 5.12.9
JDK 8
Gradle 4.6Upgraded to:
Same Qt version
JDK 11
Gradle 7.4.0To achieve this, I updated some deprecated Manifest settings and moved them to gradle.
I am able to compile and run the application however I see a runtime error and UI goes blank. The error in logcat is as follows:E/Qt: Can't create main activity java.lang.Exception: at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:607) at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166) at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266) at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273) at org.corob.qt.CorobActivity.onCreate(CorobActivity.java:250) at android.app.Activity.performCreate(Activity.java:8591) at android.app.Activity.performCreate(Activity.java:8570) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4150) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) code_text
To be precise, it occurs on the following line in myactivity.java:
super.onCreate(savedInstanceState);
The only thing I did was upgrading environment. I am not sure if any new addition is expected with this upgrade?