Recent

Author Topic: LAMW Android Installation Tutorial  (Read 2942 times)

gary

  • New Member
  • *
  • Posts: 28
LAMW Android Installation Tutorial
« on: December 26, 2024, 03:01:32 pm »
# LAMW Android Tutorial

I am using Windows 11, 64-bit system.

## 1. Installation Section

1. I installed **laz4android3.4-FPC3.2.2.exe** on 2024-07-17. 
   Download link: [Laz4Android](https://sourceforge.net/projects/laz4android/files/?source=navba
   Reason: It has installed all the cross Android compilers: arm-android / aarch64-android / i386-android / x86_64-android / jvm-android. 
   If you want to install the cross compilers yourself, I haven’t learned about that. If anyone knows, feel free to share, or you can try using **Fpcupdeluxe** to install.

2. I installed **LAMW 0.8.6.4**. 
   Download the latest version of LAMW: 
   Link: [LAMW GitHub](https://github.com/jmpessoa/lazandroidmodulewizard/archive/master.zip
   After extracting, copy the files to **C:\laz4android3.4\components\**. Be careful not to misplace the directory; I think it won't matter too much since it's just a directory for storing components. 
   Then install the **LPK** files in this order:
   - tfpandroidbridge_pack.lpk
   - lazandroidwizardpack.lpk
   - amw_ide_tools.lpk 
   If you can’t find the files, try searching in that directory.

3. I installed **JAVA JDK 21.0.2 (64-bit)**. 
   Download link: [Oracle JDK](https://www.oracle.com/cn/java/technologies/downloads/#java21
   I chose this: [JDK Download](https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.exe
   Of course, you can install this JDK as well, but I haven't tried it: 
   [Adoptium](https://adoptium.net/]"]>Blockedrin/releases/)

4. I installed **Gradle 8.6**. 
   Download link: [Gradle Releases](https://github.com/gradle/gradle-distributions/releases/download/v8.11.1/gradle-8.11.1-all.zip
   I think you can download a higher version.

5. I installed **Apache Ant 1.10.14**. 
   Download link: [Apache Ant](https://ant.apache.org/bindownload.cgi
   I directly extracted it and placed it in the C drive (I believe you can place it in any directory). I think you can also download a higher version.

6. I installed **NDK r21e (Windows 64-bit version)**. 
   Download link: [NDK Unsupported Downloads](https://github.com/android/ndk/wiki/Unsupported-Downloads
   I do not recommend downloading a higher version as I am concerned about compatibility with the LAMW version.

7. I installed **SDK Commandline Tools** as **CommandlineTools-win-11076708_latest**. 
   Download link: [Android Command Line Tools](https://dl.google.com/android/repository/commandlinetools-win-11076708_latest.zip
   I created a target tree at **C:\android\sdkJ21\cmdline-tools\latest**. 
   I copied the extracted files to **C:\android\sdkJ21\cmdline-tools\latest\bin**. 
   Open a DOS command prompt and navigate to the bin directory, then execute: 
   ```bash
   sdkmanager "build-tools;34.0.0" "platforms;android-34" "platform-tools"
   ```
   It’s particularly important to note that this directly impacts your directory settings in LAMW. If this step fails, it may lead to issues with the normal operation of LAMW (this is very important).

8. Install **Android Studio**. 
   The reason I installed it is to use its emulator. You can create a new emulator in it and name it **PFAPI35** (we'll use this name later). 
   Create a bat file and save the following code to execute (xxx is your computer username) to start the emulator, so you can test without connecting a phone: 
   ```bash
   @echo off
   echo 'Start AVD'
   c:
   cd C:\Users\xxx\AppData\Local\Android\Sdk\emulator
   emulator -avd PFAPI35
   ```

## 2. Running Section

1. Project - New Project - LAMW [GUI] Android App.

2. NDK API: 22, Min. Device API: 23, Target API: 34.

3. Select Aarch64, as the emulator I installed seems to be Android 64-bit. I assume there might be errors if it’s different, which is very important.

4. Compile.

5. [LAMW] Build Android Apk and Run.

## 3. Congratulations!

You can now explore the mysterious world of Android!

---

The above document was updated on: December 26, 2024.

Please correct me if I'm wrong, thank you very much!

cdbc

  • Hero Member
  • *****
  • Posts: 1746
    • http://www.cdbc.dk
Re: LAMW Android Installation Tutorial
« Reply #1 on: December 26, 2024, 04:07:24 pm »
Hi
Cool mate, well done.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Seenkao

  • Hero Member
  • *****
  • Posts: 648
    • New ZenGL.
Re: LAMW Android Installation Tutorial
« Reply #2 on: December 27, 2024, 08:05:44 am »
Quote
Select Aarch64, as the emulator I installed seems to be Android 64-bit.
Если у вас компьютер на архитектуре x86_64, то и эмулятор надо выбирать этой же архитектуры. При этом надо помнить, что собирать проект надо именно по эту архитектуру или сразу под несколько, но чтоб данная архитектура поддерживалась в сборке.

Для поддержки большинства устройств желательно делать сборку для 4-х архитектур: x86, x86_64, arm32 и arm64 (aarch64).

--------------------------------------------
Google translate:
If you have a computer with the x86_64 architecture, then you should choose the emulator of the same architecture. At the same time, you should remember that the project should be built for this architecture or for several at once, but so that this architecture is supported in the build.

To support most devices, it is advisable to build for 4 architectures: x86, x86_64, arm32 and arm64 (aarch64).
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

gary

  • New Member
  • *
  • Posts: 28
Re: LAMW Android Installation Tutorial
« Reply #3 on: December 31, 2024, 04:42:04 am »
Please tell me how to do this, I need details of the process, thanks!

Seenkao

  • Hero Member
  • *****
  • Posts: 648
    • New ZenGL.
Re: LAMW Android Installation Tutorial
« Reply #4 on: December 31, 2024, 07:39:42 am »
gary, я не могу в данном случае помочь, я занимаюсь немного другим направлением Android. И у меня настроено всё для сборки сразу 4-х  архитектур. Спросите у разработчика LAWM как это можно сделать.

Google translate:
gary, I can't help in this case, I'm working on a slightly different area of ​​Android. And I have everything set up to build 4 architectures at once. Ask the LAWM developer how to do this.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

 

TinyPortal © 2005-2018