0
votes

Is it possible to create an app for Android 6 using Delphi XE8 instead of Delphi 10?

Now apps seem to crash on Android 6, but Delphi 10 apps seem to crash on older android versions.

I have multiple Android SDK installed from 19(Android 4.4) till 23(6.0) I also have the newest android NDK(r10e) and the newest Java JDK.

The crashes seem to be very random. Can't yet say why it crashes exactly. I'll try to find out more!

Update:

It seems to be a device specific problem. If I run Delphi 10 app on emulators with android 4.2/6.0 the app doesn't crash. Also on my samsung galaxy tab with android 4.2 it doesn't crash. Only my sony xperia with android 5.1 crashes.

Update: My app seems to crash becore I call TCloseAction.caFree in the FormClose event of my 2th form

1
Possible? Maybe. Apps written in Delphi 10 Seattle have been shown to be deployed and running on Marshmallow, not sure about XE8 apps. What kind of crashing are you seeing? Delphi's documentation does not list Marshmallow as an officially supported Android version yet, even in Seattle. However, Seattle is supposed to support Android versions going back to at least ICS, so crashes in Seattle should be reported to QualityPortal. Maybe you don't have the correct Android SDKs installed?Remy Lebeau
@RemyLebeau i've updated my question. The crashes seem to be very random, can't yet say when it crashes.Remi

1 Answers

0
votes

I found out what the problem was for older android versions with my Delphi 10 version of the project.

Through commenting out code I found out that the TCloseAction.caFree crashes the app in the formclose event. I can't remove this otherwise the form memory doesn't get freed. I tried multiple methods but only this totaly frees all the memory of a form in a Firemonkey multi device project.

After finding this out I found that it crashes when I add a TVertScrollBox to a TTabItem. On my Form I have multiple tabs. And on one of them I have a Listbox that I fill runtime with items and below that a memo. In order to use this memo correctly I added a TVertScrollBox so when the keyboard is shown the keyboard doesn't hide the memo. When I added the VertScrollBox in the designer my listbox doesn't draw the items correctly, so that's why I add it runtime. But this causes the crash on older android versions. Apparently it doesn't like to get freed in the onClose event for some reason.

So for the final solution i'm left with putting the memo in the top of the TTabItem so it never gets hidden behind the keyboard and removing the TVertscrollbox from designer/runtime. Now my ListBoxItems get drawn correctly and my app doesn't crash on older android versions anymore.