Zoltán Szűcs
Zoltán Szűcs

Reputation: 11

Android app not running after splash screen

I would like to contact you with the problem that I switched from Delphi version 10.4 to Alexandria (11.2).

From then on, my Android applications compile and build without error, but after the splash screen they do not start on Android devices, regardless of the Android version. Not even on those that ran without errors before.

I did not change the source code, only the development tool was updated.

Looking around the Internet, others are also complaining about this phenomenon, but I can't find a solution anywhere.

My respectful request would be that if you can suggest some kind of solution, please let me know, because this is why I am standing still and it would be good to move forward.

Thank you in advance for your answers.

Android system libraries have been reset to default.

Upvotes: 1

Views: 492

Answers (1)

Jim McKeeth
Jim McKeeth

Reputation: 38703

There are a lot of possibilities. Here are a few steps you can use to troubleshoot this sort of failure.

Always back up your project first. Preferably using source control!

Revert Deployment

In the release notes for 11 Alexandria there is section about updates to the Android Manifest

An older Android Project Might Fail at Run Time or When Debugging
Building an older Android project in the IDE can cause the app to fail at run time and debug time, with a Java "Class not found error". To correct the issue, do the following:

  1. Select Project > Deployment.
  2. In the Deployment Manager, click the Revert To Default speed button.

It is the 7th button that looks kind of like "undo". Make sure you select the Android platform.

Deployment Manager - Revert to Default

Test a New Project

Create a new simple project from scratch and see if it will run. Try both Android 32-bit and 64-bit. If it doesn't then there may be something wrong in your SDK Manager (Tools -> Options -> Deployment -> SDK Manager). SDK Manager

Look under Android on all three tabs: SDK, NDK, Java; for any warning symbols. You might need to correct a path or install Android support.

Compare AndroidManifest.template.xml

Take the AndroidManifest.template.xml from the new project you created, and compare it to the one in your project from a previous version. If you haven't modified it then you can just copy the new one over the old one.

Revert Android Libraries

Expand out the Project Manager and the Android platforms to Libraries. Right click and choose Revert System Files to Default.

Revert Android System Files

More Debugging

  1. You can use ADB LOGCAT to see the error on failure. This is super useful. There are GUI wrappers for it, like DeviceLens by Dave Nottage of DelphiWorlds.
  2. Check the code in your form constructor. An exception here can cause a crash like you are describing.
  3. Reboot your phone. I hate how often this fixes things for me. It should be the first thing, but it is usually the last.

Upvotes: 4

Related Questions