Recent

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

WayneSherman

  • Full Member
  • ***
  • Posts: 167
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #75 on: October 22, 2021, 04:22:38 pm »
The emulator start after run script
run on port 5556 is correct?

but lazarus after complier not install app on emulator
terminal windows show message error but close ealry

lazarus emulator window not show virtual machine create how image attachment

Are you compiling a 32-bit or 64-bit APK?  In my example, I used a 32-bit ARM emulator system image so I tested with a 32-bit APK.
For the emulator listening port, the terminal output says "Started GRPC server at 127.0.0.1:8554, security: Local"

On my test VM, I get the same "Android emulators" popup window only if I am not running the emulator already.  The "Refresh" and "AVD Manager" buttons don't do anything.
« Last Edit: October 22, 2021, 07:43:29 pm by WayneSherman »

loaded

  • Hero Member
  • *****
  • Posts: 757
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #76 on: October 22, 2021, 05:44:49 pm »
why are the controls not aligned as shown in the drawing?
A close example of what you want to do; https://cadplugin.com/other/AppLAMWProject1.rar
For more control you should use the layout, it may take some trial and error.
« Last Edit: October 22, 2021, 05:50:25 pm by loaded »
If Ide=Lazarus 2.2.4 32 Bit and Os=Win 10 Home 64 Bit 22H2 then Get up and do something useful! Because God is the helper of those who start again;

laguna

  • Sr. Member
  • ****
  • Posts: 322
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #77 on: October 22, 2021, 05:52:49 pm »
Ok Thank download run
« Last Edit: October 22, 2021, 05:56:45 pm by laguna »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2222
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #78 on: October 22, 2021, 07:07:12 pm »

Quote
why are the controls not aligned as shown in the drawing?

From here:

https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/LAMW_Getting_Started.txt

Quote
[FAQ 2]: [Thanks to Ahmad Bohloolbandi (a.k.a. @developing) ]

#Question: How do we can design a layout that shown same in real device?

[Answer]: You should use the component properties:

      "Anchor",
      "PosRelativeToParent",
      "PosRelativeToAnchor",
      "LayoutParamHeight",
      "LayoutParamWhidth"
         
Example:

1-Put a "jTextView" component on your AndroidModule form:

   Set "PosRelativeToParent"
      "rpCenterHorizontal" [True]
      "rpTop" [True]

2-Put a "jButton" component on AndroidModule form:

   Set "Anchor" to "jTextView" (Because you should set position relative with "jTextView")
   set "PosRelativeToAnchor"
      "raBelow" [True]

3-Put a "jEditText" component on form:

   Set "Anchor" to "jButton".
   Set "PosRelativeToAnchor"
      "raBelow" [True]

NOTE:    Anchor setting is most important section of this design,
   because your component position depends on this property.
   And for change width and/or height of each components you should
   change/configure "LayoutParamWhidth" and/or "LayoutParamHeight".
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

laguna

  • Sr. Member
  • ****
  • Posts: 322
Re: [HowTo] Android Development Environment on Linux (FPCUPdeluxe + LAMW)
« Reply #79 on: October 22, 2021, 09:01:32 pm »
Thanks

WayneSherman

  • Full Member
  • ***
  • Posts: 167
Updated installation procedure to 2022-May-01 ver 1.7
(see first post in this thread)

Changes:
Code: Text  [Select][+][-]
  1. Updated Android Command-Line Tools for Linux to build 8092744 (previous was 7583922)
  2. Updated Android SDK/API Level 31 (Android 12) (previous was 29)
  3. Updated Gradle 7.3.1 (previous was 6.8.3)
  4. Updated FPCUPdeluxe ver 2.2.0i (previous was 2.2.0c)
  5. Lazarus stable is now v2.2.0 (previous was v2.0.12)
  6. Add "sudo apt update" at the beginning for good measure
  7. Instead of installing "ndk-bundle" we now explicitly install "ndk;22.1.7171670"
  8.   (This provides more control of the NDK version, Google will update the ndk-bundle
  9.    version to NDK 23 at some point and LAMW is not ready for that yet)
  10. Remove the ini edit for "PrebuildOSYS=linux-x86_64" since LAMW detects that for us.
« Last Edit: May 01, 2022, 11:04:55 pm by WayneSherman »

WayneSherman

  • Full Member
  • ***
  • Posts: 167

WayneSherman

  • Full Member
  • ***
  • Posts: 167
Updated:
https://wiki.freepascal.org/LAMW_install_linux_fpcupdeluxe

Changes:
Code: Text  [Select][+][-]
  1. Added LAMW bug work-arounds for two cases:
  2.   1) Directly after creating a new project, save the project, close Lazarus, and re-open.
  3.   2) Directly after opening a demo project, save the project, close Lazarus, and re-open.
  4.  
  5. Tested on more distro versions
  6.   xubuntu-20.04.6-desktop-amd64
  7.   xubuntu-22.04.2-desktop-amd64 (minimal install)
  8.   xubuntu-23.04-minimal-amd64 (NOTE: I will not usually test on non-LTS versions)
  9.   manjaro-xfce-22.1.2-minimal-230518-linux61 (based on arch linux)
  10.  
  11. Manjaro does not have special issues with changing the LAMW project chipset - remove previous comment
  12. Don't explicitly install freeglut3 (it gets pulled in if needed by freeglut3-dev)
  13. Remove subversion from install packages (fpc and lazarus both use git now)
  14. Remove apache-ant from pacman (arch linux) install (fpcupdeluxe installs a private copy)
  15. Testing with updated software components:
  16.   fpcupdeluxe 2.2.0r
  17.   OpenJDK ver 11.0.19
  18.   Lazarus stable v2.2.6

Detailed Changes:
https://wiki.freepascal.org/index.php?title=LAMW_install_linux_fpcupdeluxe&type=revision&diff=156492&oldid=156484
« Last Edit: May 23, 2023, 02:24:35 am by WayneSherman »

 

TinyPortal © 2005-2018