Massimo Potere 0 Posted April 30 Hello, i have 2 phones (Android 6 and Android 13) and an emulator (x86_64). When i try to run/debug the ide compile and create the apk but then i get that message. By googling i tought it was the emulator but this happens on all (emulator and phones). But the weird thing is that i tried to install the apk with adb and the apk run normally on the emulator and on both phones... TL;DR; Run from the ide dont work but adb install the apk work. Share this post Link to post
Pierce Ng 0 Posted May 2 I just installed Delphi 11.3 CE. Encountered this too. The app runs on my phone but not on the emulator, reporting same error "Your Android device does not support blah blah." The APK file is a zip archive. Here's the Delphi-generated APK: % unzip -v Project1.apk Archive: Project1.apk Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- <more lines> 31936608 Defl:X 6835125 79% 1980-01-01 08:00 11348172 lib/arm64-v8a/libProject1.so 21628 Defl:X 9693 55% 1980-01-01 08:00 ffb92c06 lib/armeabi-v7a/libProject1.so 25720 Defl:X 10952 57% 1980-01-01 08:00 ae7d68da lib/armeabi/libProject1.so 71860 Defl:X 7968 89% 1980-01-01 08:00 4b4fa900 lib/mips/libProject1.so <more lines> -------- ------- --- ------- 39609799 9922649 75% 26 files Here's an APK I built on Linux using an Android Studio project setup, with Gradle, Cmake, etc. The .so file is built using Free Pascal btw. This app runs on my arm64-v8a phone and the x86_64 emulator on my Linux. I just "adb install" it to the Windows emulator; works there too. % unzip -v app-debug.apk Archive: app-debug.apk Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- <more lines> 90360 Stored 90360 0% 1981-01-01 01:01 febe2452 lib/arm64-v8a/libdwprunner.so 80728 Stored 80728 0% 1981-01-01 01:01 f217b3ea lib/armeabi-v7a/libdwprunner.so 81228 Stored 81228 0% 1981-01-01 01:01 bbe69e19 lib/x86/libdwprunner.so 74304 Stored 74304 0% 1981-01-01 01:01 6537ec19 lib/x86_64/libdwprunner.so <more lines> -------- ------- --- ------- 20094501 13777010 31% 810 files Notice my Delphi APK has arm64-v8a, armeabi-v7a, armeabi, and mips (are there still MIPS phones around?) but no x86_64. Can you run "unzip -v" on your APK and see what you get. Share this post Link to post
Massimo Potere 0 Posted May 2 Hi, first, yes i have only arm64-v8a, armeabi-v7a, armeabi, and mips but: i have installed Aida64 on the phone then did a backup and installed the apk on the emulator. The emulator have both Supported ABIs and Supported 64-bit ABIs = "x86_64, arm64-v8a" I get the error when i press F9 to run (or debug): But the adb install/run work fine: Quote adb install -r .\Android64\Debug\TestProject\bin\TestProject.apk adb shell am start -a android.intent.action.MAIN -n com.embarcadero.TestProject/com.embarcadero.firemonkey.FMXNativeActivity PS. Instead of the zip you can check it in the ide: Project > Deployment Share this post Link to post
Pierce Ng 0 Posted May 3 TIL: As per Run ARM apps on the Android emulator, "The new Android 11 system images are capable of translating ARM instructions to x86 without impacting the whole system." As per SO, "ARM64 emulation on a x86_64 host currently is only possible up to API level 27 Oreo". So I set up an API level 27 system image for the emulator, and the Delphi-built APK runs on it. Well, "runs" is not quite it, more like "crawls". Doing ARM emulation on x86_64 is just too slow. My laptop dual-boots Linux and Windows. When Linux, my setup builds x86_64 .so files for the emulator, and arm64-v8a .so files for my phone. The laptop is low-end, and such a setup at least makes it usable for tinkering with building Android apps. I also tried setting up another SDK in Delphi to build for x86_64, but that fails because the object files in C:\Program Files (x86)\Embarcadero\Studio\22.0\lib\Android64, which are linked into the generated APK, are arm64, not x86_64. Share this post Link to post
Massimo Potere 0 Posted May 3 10 hours ago, Pierce Ng said: So I set up an API level 27 system image for the emulator, and the Delphi-built APK runs on it. But the apk work if i send it to the emulator (api33) with adb, is the IDE that for some reason say "not compatible" Share this post Link to post
p-samuel 2 Posted June 7 Sharing similar pangs. Never has been a time which I could compile targeting Android with Delphi that I wouldn't have issues. C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidNDK-21-21.0.40680.4203\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe: error: c:\program files (x86)\embarcadero\studio\21.0\lib\Android64\Release\System.o: incompatible target Share this post Link to post
Pierce Ng 0 Posted June 15 On 6/7/2024 at 8:56 PM, p-samuel said: C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidNDK-21-21.0.40680.4203\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe: error: c:\program files (x86)\embarcadero\studio\21.0\lib\Android64\Release\System.o: incompatible target You're using 'arm-linux-androideabi-ld.exe' (for 32bit ARM) to process '...\Android64\Release\System.o' which is for 64bit ARM. /mnt/c/Program Files (x86)/Embarcadero/Studio/22.0/lib/android64/release% file System.o System.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), with debug_info, not stripped /mnt/c/Program Files (x86)/Embarcadero/Studio/22.0/lib/android/release% file System.o System.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (GNU/Linux), with debug_info, not stripped Toolchain executables for 64bit ARM are in '<ndk>\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin'. Share this post Link to post