# 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!