【问题标题】:Android app not running after splash screenAndroid app not running after splash screen
【发布时间】:2022-12-02 07:35:22
【问题描述】:

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.

【问题讨论】:

  • There could be a number of reasons why this behaviour exists. The first step would be to run the app via the debugger, and see if there are any error messages. If your app has a service, you may wish to refer to this. You may need to delete the AndroidManifest.template.xml file and allow the IDE to recreate it when you rebuild the application. If you have any customisations in AndroidManifest.template.xml, be sure to reinstate them when the file is recreated

标签: android delphi


【解决方案1】:

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. SelectProject > Deployment.
  2. In theDeployment Manager, click theRevert To Defaultspeed button.

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

    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 yourSDK Manager (Tools -> Options -> Deployment -> 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 toLibraries. Right click and chooseRevert System Files to Default.

    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.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-27
    • 2022-11-20
    • 2022-08-04
    • 1970-01-01
    • 2020-12-04
    相关资源
    最近更新 更多