Recent

Author Topic: Fpc.exe doesn't support arm-android  (Read 2320 times)

Tomi

  • Full Member
  • ***
  • Posts: 102
Fpc.exe doesn't support arm-android
« on: April 20, 2021, 10:09:58 am »
Hello experts!

On my Windows 10 system I have installed Lazarus 2.0.12. and the Android packages (lazandroidwizardpack.lpk, etc.) into it. Everything went well, but when I start e.g. a new LAMW [GUI] Android Module, Lazarus warns me that fpc.exe doesn't support target: arm-android.
After this I have installed fpc-3.2.0.i386-win32.cross.android.exe into the Lazarus folder. So now the necessary files are in the Lazarus, in theory, but I get the same error message.
My question is how can I solve this problem? Maybe should I add a path for an other compiler instead of fpc.exe? But which is that?

loaded

  • Hero Member
  • *****
  • Posts: 824
Re: Fpc.exe doesn't support arm-android
« Reply #1 on: April 20, 2021, 10:16:30 am »
Hello,
Have you used LAMW manager?
https://forum.lazarus.freepascal.org/index.php?topic=45361.0 It will handle many processes for you.
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

Tomi

  • Full Member
  • ***
  • Posts: 102
Re: Fpc.exe doesn't support arm-android
« Reply #2 on: April 20, 2021, 10:29:56 am »
Hello,
Have you used LAMW manager?
https://forum.lazarus.freepascal.org/index.php?topic=45361.0 It will handle many processes for you.
Hello Loaded!

I tried with that, but it failed, because it didn't find "MakeFile".
But I could install Android packages by hand and Lazarus shows "Android Bridges", "Android Bridges Extra", etc. possibilities, so the install went well, and only missing the arm-android compiler(?).

loaded

  • Hero Member
  • *****
  • Posts: 824
Re: Fpc.exe doesn't support arm-android
« Reply #3 on: April 20, 2021, 10:55:00 am »
Previously, I made a smooth setup via LAMW manager.
Now;
 https://forum.lazarus.freepascal.org/index.php?topic=45361.0
  (II) LAMW4Windows-installer
  .....
 [Optional]
 https://github.com/DanielOliveiraSouza/LAMW4Windows-installer/archive/master.zip  link

 I am installing LAMW manager from scratch, I will inform you of the result.

.......

Build, Install to Real Device, Run; Result: Successful. :)



« Last Edit: April 20, 2021, 11:47:49 am by loaded »
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

Tomi

  • Full Member
  • ***
  • Posts: 102
Re: Fpc.exe doesn't support arm-android
« Reply #4 on: April 21, 2021, 02:01:27 pm »
Before I will try that; what mean this error message? Something is missing or the path is not correct?

Tomi

  • Full Member
  • ***
  • Posts: 102
Re: Fpc.exe doesn't support arm-android
« Reply #5 on: April 21, 2021, 05:00:52 pm »
Hello Loaded!

It seems to the installation is succeeded!
Although installation of the APK Installer failed, because it didn't recognize my old LG K8 smartphone. But can I install an Android emulator onto my Windows 10 PC? Will Lazarus detect it automatically? For example Leapdroid or similar program.
And my other question: where is the .APK file after I built it with [LAMW] Build Android APK and Run? I made a small application named Test. In its folder there are Test-debug.apk, Test.ap_, etc. files. Which one is that application, that can I install onto my phone?
Otherwise, big thanks for you and for your "life-saver" program! :D

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Fpc.exe doesn't support arm-android
« Reply #6 on: April 21, 2021, 07:25:06 pm »
1. To check the functionality of applications, I use genymotion-2.9.0 on a laptop, genymotion-3.1.0 on a stationary computer. (Newer versions don't work for me.)
You need to start Genymotion, then compile and build the project. At the end of the build, the project will start in the Genymotion window.
I asked a question (https://forum.lazarus.freepascal.org/index.php/topic,54248.0.html) and there is a picture of the program running in Genymotion.

2. APK files when using "GRABLE" are located in the "debug" and "release" folders at: C: \ Lazarus \ Work \ Test \ build \ outputs \ apk

loaded

  • Hero Member
  • *****
  • Posts: 824
Re: Fpc.exe doesn't support arm-android
« Reply #7 on: April 21, 2021, 07:51:43 pm »
For application installation;
You should make sure that the usb drivers of your device are installed properly. Also, in the Developer options, you should make sure that the -> Usb debugging option is active on your device.

Regarding the emulator Another option; (I also use)
For the emulator, you can install Android Studio.
Now, Android Studio's emulator is surprisingly fast.
Later, you can use what you have done in LAMW to sign projects and publish them in google play store.
« Last Edit: April 21, 2021, 07:53:38 pm by loaded »
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

Tomi

  • Full Member
  • ***
  • Posts: 102
Re: Fpc.exe doesn't support arm-android
« Reply #8 on: April 22, 2021, 09:31:57 am »
Android Studio is already installed on my PC, although I still never use it. But how can I set the path to its emulator in Lazarus?

Tomi

  • Full Member
  • ***
  • Posts: 102
Re: Fpc.exe doesn't support arm-android
« Reply #9 on: April 22, 2021, 10:07:09 am »
(...) APK files when using "GRABLE" are located in the "debug" and "release" folders at: C: \ Lazarus \ Work \ Test \ build \ outputs \ apk
I used the default "ANT" to my application. What is the difference between GRADLE and ANT? Which is the best for me?

loaded

  • Hero Member
  • *****
  • Posts: 824
Re: Fpc.exe doesn't support arm-android
« Reply #10 on: April 22, 2021, 11:22:13 am »
Android Studio is already installed on my PC, although I still never use it. But how can I set the path to its emulator in Lazarus?

1-Run Lazarus and open or create your project.
2-Run Android studio.
3-Start the emulator. (If you want, you can close the android studio after the Emulator is running.)
4-Build and run your project in Lazarus.

Note: After running the Emulator in Android studio, you can take the Command Line and Current Directory values for the Emulator and write an initializer yourself. So you can skip step 2.

It is prepared for a different subject but;
A video on Running the Lazarus project in the Android studio emulator, https://youtu.be/SCAOeAN3eU4

(...) APK files when using "GRABLE" are located in the "debug" and "release" folders at: C: \ Lazarus \ Work \ Test \ build \ outputs \ apk
I used the default "ANT" to my application. What is the difference between GRADLE and ANT? Which is the best for me?

You can check the link below about ant and gradle.
https://medium.com/dev-genius/ant-vs-maven-vs-gradle-801fde21af80

Note : According to my observations, ant is faster in Lazarus.
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

Tomi

  • Full Member
  • ***
  • Posts: 102
Re: Fpc.exe doesn't support arm-android
« Reply #11 on: April 23, 2021, 10:21:07 am »
Thank you, Loaded!
My Android Studio doesn't contain AVD Manager (in Tools menu), so I couldn't use it. But I have installed Leapdroid, and it works well and enough fast - although my first .APK application is a very small program: it only shows a button and after you click onto it, its text has been changed.
But this is only the beginning...  :D

 

TinyPortal © 2005-2018