Android app crashes at startup
Having trouble deploying app on client's android device, a Sony Xperia X Compact running Android 7. The app runs fine on all other devices I have tested. Unfortunately I do not have access to the device as the client is a few hundred miles away. Has anyone experienced a similar problem?
The app is a Qt Quick 2 application and does use multimedia ( which I suspected may be a problem ) but I have tried a minimal Qt Quick app and still no luck.
Any pointers would be welcome
Is your client tech-savvy? If so, you could ask him to start
adb logcatbefore he starts the application. That probably gives you some indication why the app is crashing.
Does the app crash right at the beginning or after some user action? If the app crashes after the user does some action, you could also add a bunch of debugging messages to the app which get written to a file. That might help you to track the error.
Another possibility is to add google breakpad which writes a crash dump to a file. However, for this it is necessary that the app at least gets to the point where google breakpad gets initialized. I implemented something similar in my app where every crash dump gets sent to Hockeyapp. So it's definitely doable. with Qt.
Thanks for your response Schluchti
It is crashing before any user action.
I will try what you suggest
Just my 3 cents...
- While the problem shows only on the Sony , it could as well be about something like an uninitialised variable that just happens to work everywhere else, but the Sony... I have noticed that sometimes problems take their time to show themselves.
So even though you might send a logging-enabled version to the customer, I'd check the code once more for any generic problem -- most critically initialisation, values and usage of every variable.
The Sony seems to have very high pixel density, and one should suspect anything that is different to other devices... Perhaps there are some assumptions in the code that are not valid with the Sony.
You don't mention Qt version. I think it would be natural to think that the later releases should be able to handle any problems with new devices better than the old ones.
Google removed SSL stuff from Android 7. My apps worked fine on Android 6, but crashed immediately on Android 7.
I ended up following this (which worked without issue):