Jump to content
nevez

Delphi 12.1 Android API 34 - not support architecture

Recommended Posts

Hello,
I'm using Rad Studio 12.1.
via Android Studio,
As Android14- API 34 SDK,
I downloaded NDK version 20.0.5594570.
I am also using jdk 22.0.

I specify the paths in the SDK ndk manager by selecting the android-64 bit option from the Deployment->sdkmanager section in Rad Studio.
After following these steps, when I open an empty project and run my project with Android 64 bit, it always gives the following Error:

"Your Android device does not support the selected target platform architecture".

As far as I understand, rad studio creates a project with arm64-v8a architecture. However, none of the Android emulator devices created with SDKManager currently support ARM architecture. It only allows emulators with x86_64 architecture. I guess that's why I'm getting this error.

I've been searching for days, but I couldn't find anything clear because the versions are so new.
The methods, emulator devices, etc. I use in the link below. with. I put detailed pictures about it.

Can you help me

 

 

error.png

rad-studio.png

ss1.png

ss2.png

ss3.png

studio-device.png

Share this post


Link to post

Have you tries with the SDK/NDK/JDK that are shipped with the Delphi originally?
https://delphiworlds.com/2024/04/delphi-12-1-and-codex-2-2-released/

 

I think this might be critical, because of the deep changes in this Android tools and internals.
I would recommend to stay with the original D12.1 setup and files in the first place, if there is no specific need to really upgade the SDK.

 

 

 

  • Like 1

Share this post


Link to post
Posted (edited)
13 hours ago, Rollo62 said:

Have you tries with the SDK/NDK/JDK that are shipped with the Delphi originally?
https://delphiworlds.com/2024/04/delphi-12-1-and-codex-2-2-released/

 

 

 

Unfortunately, I do not have Delphi original sdk and ndk. However, judging by the pictures in the link you sent, It looks like they even used sdk resources downloaded via sdkmanager.

 

As far as I see here, rad studio always tries to create projects with arm64 architecture. However, in Android emulators, especially in Android (10... - 14) versions, ARM architecture support has been removed. Only supports x86_64 architecture.
Main Error This:
"
Your Android device does not support the selected target platform architecture"


For this, while I was using Android 14 on the Rad Studio side, I set an emulator with Android 7.1 Arm architecture as the emulator just to accept the Arm architecture, but it gave an error again.
"unable to create process: Performing  Streamed Install
adb:failed to install: Cant find service: package"

 

So I really need someone who has been doing these installations with the new versions lately. What solution is needed? How can I compile my project with x86_64 architecture via Rad Studio? Because from the Rad Studio->Deployment->sdkmanager section, If I choose x86_64 paths instead of the arm paths that the program automatically selects, it gives the following error.
[DCC Error] E2597 C:\Users\Bim_Desktop2\AppData\Local\Android\sdk\ndk\20.0.5594570\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\aarch64-linux-android\bin\ld.exe: cannot find -ldl


Any solution?

Edited by nevez

Share this post


Link to post
3 hours ago, nevez said:

How can I compile my project with x86_64 architecture via Rad Studio?

There is not Android x86 platform in Delphi. For debugging you can use Android devices or better Windows 32 for non Android specific things.

Share this post


Link to post
Posted (edited)
1 hour ago, Cristian Peța said:

There is not Android x86 platform in Delphi. For debugging you can use Android devices or better Windows 32 for non Android specific things.

Thanks for answer.

This is sad to hear.
Because, as seen in the photo, they are now forcefully forcing developers to use X86_64 in new Android versions. In order to use it smoothly, those who are still trying to use Arm have to downgrade the emulator system image to Android 7 (api25) as shown in the photo, and still the emulator does not work properly in this case. I think Rad Studio should take action on this issue.

By the way, what do you mean by Windows32? Do you mean compiling Android as 32 bit?

 

test.png

Edited by nevez
for image

Share this post


Link to post
1 hour ago, nevez said:

By the way, what do you mean by Windows32? Do you mean compiling Android as 32 bit?

 

Compile the fmx application for windows 32 platform. (Unfortunately) The (only) most stable platform to debug delphi application.

Share this post


Link to post

I connected my phone with a USB cable and ran Android 64 bit. The application opens and closes on the phone. I created a log file about this using logcat,

but I didn't understand much

can you help me

 

log64.txt: https://jumpshare.com/s/eKCGnGl1TXR6KVmrPMjt
(I had to upload it to a separate link because the uploadable file size exceeded (32mb)).

Share this post


Link to post
Posted (edited)

And I also want to ask one more question. In previous NDK versions (version 20 and below), paths can be easily defined and automatically installed via Delphi 12. However, when I try one of the NDK versions version 21 and above, when I select the Ndk base path through Rad Studio, it cannot find 4-5 of the subpaths. And I scanned the contents of my Ndk folder. A few files requested by rad studio, such as strip.exe, do not exist at all. Where is the platforms folder on ndk version 26?  What should I do ?
 

ndk1.png

ndk2.png

Edited by nevez

Share this post


Link to post
Posted (edited)
5 hours ago, nevez said:

What should I do ?

Use one that works with the version of Delphi you're using. Either use Tools | Manage Features (in the Delphi menu) and select the Android SDK/NDK, or download a compatible NDK from the NDK downloads. r21e looks like it might work: https://github.com/android/ndk/wiki/Unsupported-Downloads#r21e

Edited by Dave Nottage

Share this post


Link to post
Posted (edited)

@Dave Nottage   

 

As you said, I downloaded the sdk and ndk files from delphi 12.1 studio. When I run Android 64bit on my phone, the application closes immediately when opening. It does not give any errors on the Rad studio screen. I did some research but couldn't figure it out.

what should I do?
downloaded sdk: SDK25 - android 14,
downloaded ndk: android-ndk-r21

Edited by nevez

Share this post


Link to post
Posted (edited)

Last update:

Whilte tryinh it on a real device with android64 bit the application freezes on the white screen while opening.

I only logged the errors with logcat.

This is an error given at the beginning: 
"keystore2: keystore2::maintenance: Call to earlyBootEnded failed for security level STRONGBOX: In call_with_watchdog: getting keymint device."
"keystore2: keystore2::error: In call_with_watchdog: getting keymint device"
 
 
after a fes mistakes like this, he always repeats the same thing. I have attached detailed log txt.
Thanks..
 
 
 

 

log64.txt

Edited by nevez

Share this post


Link to post
2 hours ago, nevez said:

Whilte tryinh it on a real device with android64 bit the application freezes on the white screen while opening.

Does this happen for you with a blank application? If not, it would help to have a sample app that "freezes" like you're describing.

Share this post


Link to post
8 hours ago, Dave Nottage said:

Does this happen for you with a blank application? If not, it would help to have a sample app that "freezes" like you're describing.

 

No. It works fine when I run an empty project. I mean, when I run on my own project, it stays on the application loading screen.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×