Recent

Author Topic: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)  (Read 8903 times)

HobbyDev

  • New Member
  • *
  • Posts: 25
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #15 on: April 18, 2018, 09:52:38 pm »
Hmm - didn't work - unfotunatly. I startet withe this first package, everything worked fine "linking lazarus" was the last message I saw, then Lazarus restartet but all I got is the into-picture, nothing else. In Terminal I get a lot of information, here are just the last lines...
Quote
Exception at 0000000000000000: EAccessViolation:
Access violation.
TApplication.HandleException Access violation
  Stack trace:
  $00007F0ECCADF27F
Exception at 00007F0ECCADF27F: EAccessViolation:
Access violation.
LAZARUS END - cleaning up ...
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00007F0ECCACACD8
TApplication.HandleException Access violation
  Stack trace:
  $00007F0ECCACACD8
Exception at 00007F0ECCACACD8: EAccessViolation:
Access violation.
retrying the packeage installation doesn't help. Good night for today!

WayneSherman

  • Jr. Member
  • **
  • Posts: 58
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #16 on: April 19, 2018, 06:28:36 am »
Updated installation procedure to 2018-Apr-18 ver 0.9:
(see first post)
1) Add gdb and wget to package install
2) More simplification, only creating one symlink instead of four (also required adjustment to the LAMW NDK path)
3) Regarding which versions of FPC and Lazarus to install using FPCUPdeluxe, see "> 45" comments in post #2.
4) Tested on Manjaro Linux and added changes required for that distro.
« Last Edit: April 19, 2018, 06:55:40 am by WayneSherman »

HobbyDev

  • New Member
  • *
  • Posts: 25
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #17 on: April 21, 2018, 10:40:00 pm »
Well done! Pretty good job you have done! :D

Im almost through! The last point I have is, when creating the test project I get the failure message that I  have to install sdk 26.x.y. But if I try
Code: [Select]
$ ./sdkmanager "26.0.2"I get
Code: [Select]
Warning: Failed to find package 26.0.2I checked the directory
Code: [Select]
/home/user/Android/android-sdk/platforms/android-26/ and there is some stuff in there. I also checked the path settings inside Lazarus again and they the sdk- path points to /home/user/Android/android-sdk
What else can I do?
Many Thanks so far!

jmpessoa

  • Hero Member
  • *****
  • Posts: 1470
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #18 on: April 21, 2018, 11:08:29 pm »

Try:

./sdkmanager "platforms;android-26" "build-tools;26.0.3"

Quote
I checked the directory ...

You need check the folder:

/home/user/Android/android-sdk/build-tools/

and see if there is some "26.x.x"  there....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

HobbyDev

  • New Member
  • *
  • Posts: 25
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #19 on: April 21, 2018, 11:37:47 pm »
That did the job! Thank you very much!

I was trying to place a lable as written in Post #2 or a button but got the error message
Code: Pascal  [Select]
  1. Invalid Parent - A TAndroidModule1 cannot hold TControls.
  2. You can only put non visual components on it.

But this is an other thing - probably here starts the new world for me, starting reading, learning...

jmpessoa

  • Hero Member
  • *****
  • Posts: 1470
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #20 on: April 22, 2018, 12:20:17 am »

Yes, You cant put a LCL component in AndroidModule/jForm ...
Use only the components from "Android Bridges XXX"  palettes
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

HobbyDev

  • New Member
  • *
  • Posts: 25
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #21 on: April 22, 2018, 11:14:40 am »
Many Thanks again! Got it!

WayneSherman

  • Jr. Member
  • **
  • Posts: 58
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #22 on: September 30, 2018, 03:02:17 am »
Created a new wiki page for LAMW Linux Installation

Updated installation procedure to 2018-Sep-29 ver 1.1:
(see first post)

1) Work arounds were needed to deal with recent NDK / Gradle changes.
2) Updated command line SDK tools to "sdk-tools-linux-4333796.zip".
3) Using newer platform and build tools (ver 26 instead of ver 25)
4) Added MIPS toolchain links to work around NDK and gradle plugin inconsistency.
5) Using new Gradle:  gradle-4.10.2-bin.zip (previous was 4.1)
6) Add new environment variable: export ANDROID_SDK_ROOT="$HOME/android/sdk"
7) Tested with newer FPCUPdeluxe version (ver 1.6.1m)

A shoutout to Handoko for his recent hard work to create a new detailed Linux installation procedure.  Thanks for sharing.
He makes some different choices than I do, but nothing wrong with that.  Its good to have choices. :-)
Check it out here:
  LAMW 0.8 on Ubuntu 18.04 Installation Guide by Handoko
« Last Edit: September 30, 2018, 03:07:04 am by WayneSherman »

WayneSherman

  • Jr. Member
  • **
  • Posts: 58
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #23 on: September 30, 2018, 06:42:14 am »
Updated installation procedure to 2018-Sep-29 ver 1.2:
(see first post)

1) Tested and working with Xubuntu 18.04.
2) Add "update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64" to set default java to openjdk-8-jdk
3) Added commands to download and run fpcupdeluxe

See also:  Wiki page for LAMW Linux Installation

jmpessoa

  • Hero Member
  • *****
  • Posts: 1470
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #24 on: September 30, 2018, 07:49:14 pm »

Commited to LAMW git repository!!!

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

WayneSherman

  • Jr. Member
  • **
  • Posts: 58
Updated installation procedure to 2019-May-20 ver 1.3:
(see first post)

Tested and working with Xubuntu 16.04 and 18.04.

1) sdkmanager is now pulling in NDK r19c (was r18)
2) Update sdk build-tools to 26.0.3 (was 26.0.2)
3) Update Gradle to 4.10.3 (was 4.10.2)
4) Update FPCUPdeluxe to version 1.6.2v (was 1.6.1m)

5) FPC branch is now "fixes3.2" (was trunk)
6) Lazarus branch is now "fixes2.0" (was trunk)
(the "fixes" branches are more stable than trunk)

7) Add support for 64-bit android (aarch64)  :-)

The 64-bit Android (aarch64) support was a team effort. Thank you to:
  yuriy_sydorov (aarch64 support in fpc compiler)
  DonAlfredo (aarch64 support in FPCUPdeluxe)
  jmpessoa (aarch64 support in LAMW)

See also:  Wiki page for LAMW Linux Installation
« Last Edit: May 31, 2019, 06:56:12 am by WayneSherman »