Sign in Join
Wiki copytemporary

LAMW: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11*(Android only)*
22
3-<figure>
4-<img src="lamw_git_small_circle.png" title="LAMW" />
5-<figcaption>LAMW</figcaption>
6-</figure>
3+![](/wiki-images/c/cd/Lamw_git_small_circle.png)
74
85**LAMW**: Lazarus Android Module Wizard is a wizard to create JNI Android loadable module (.so) and Android Apk using Lazarus/Free Pascal.
96
107**Features:**
118
129
1310Native Android GUI
1411
1512
1613
1714AppCompat and Material Design supported!
1815
1916
2017RAD! Form designer and drag&drop component development model!
2118
2219
2320
2421More than 140 components!
2522
2623Github Page: <https://github.com/jmpessoa/lazandroidmodulewizard>
2724
2825## Get Lazarus for Android
2926
3027### Laz4Android 2.0.12 (Windows)
3128
3229
3330All cross-android compilers already installed!
3431
3532
3633arm-android/aarch64-android/i386-android/x86_64-android/jvm-android
3734
3835How to
3936
4037
4138Install * [Laz4Android 2.0.12](http://sourceforge.net/projects/laz4android/files/?source=navbar)
4239
4340> **Note:** Install here: "C:\laz4android2.0.12" (not "Program Files" !!!)
4441
4542
4643Install * [LAMW](https://github.com/jmpessoa/lazandroidmodulewizard/archive/master.zip)
4744
4845> **Note:** Download LAMW and unzip it in some folder (ex. "C:\laz4android2.0.12\components")
4946
5047
5148
5249Packages installations order/sequence:
5350
5451
5552
5653tfpandroidbridge_pack.lpk (in "..../android_bridges" folder)
5754
5855lazandroidwizardpack.lpk (in ""..../android_wizard" folder)
5956
6057amw_ide_tools.lpk (in "..../ide_tools" folder)
6158
6259Go to Infrastructure.
6360
6461### LAMW Manager (Linux and Windows)
6562
6663> **Note:** All in One! LAMW Manage produces a complete Lazarus for Android environment by automating the step Infrastructure!
6764
6865
6966Install * [LAMW Manager Installer for Linux](https://github.com/dosza/LAMWManager-linux)
7067
7168Install * [LAMW Manager Installer for Windows](https://github.com/dosza/LAMWManager-win)
7269
7370### Install LAMW using fpcupdeluxe (Linux and Windows)
7471
7572
7673
7774[How to install on Linux (FPCUPdeluxe + LAMW)](https://wiki.freepascal.org/LAMW_install_linux_fpcupdeluxe)
7875
7976[How to install on Windows (FPCUPdeluxe + LAMW)](https://wiki.freepascal.org/LAMW_install_windows_fpcupdeluxe)
8077
8178### Do It Yourself! (Windows)
8279
8380
8481Install * [Lazarus 2.0.12](https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.0.12/lazarus-2.0.12-fpc-3.2.0-win64.exe/download)
8582
8683> **Note:** Install here: "C:\lazarus2.0.12" (not "Program Files" !!!)
8784
8885
8986Install * [LAMW](https://github.com/jmpessoa/lazandroidmodulewizard/archive/master.zip)
9087
9188> **Note:** Download LAMW and unzip it in some folder (ex. "C:\lazarus2.0.12\components")
9289
9390
9491
9592Packages installations order/sequence:
9693
9794
9895
9996tfpandroidbridge_pack.lpk (in "..../android_bridges" folder)
10097
10198lazandroidwizardpack.lpk (in ""..../android_wizard" folder)
10299
103100amw_ide_tools.lpk (in "..../ide_tools" folder)
104101
105102
106103Install * [FPC source code (trunk)](https://gitlab.com/freepascal.org/fpc/source/-/archive/main/source-main.zip)
107104
108105
109106
110107Download FPC source code and unzip it in some folder and point up the source path in next step
111108
112109
113110Go to Lazarus menu "Tools" \>\> "\[LAMW\] Android Module Wizard" \>\> "Build FPC Cross Android"
114111
115112> **Note:** repeat the "Build and install" process once for each architecture
116113
117114
118115
119116\(x\) Armv7a + Soft (android 32 bits \<\< tested!)
120117
121118
122119
123120Build
124121
125122
126123
127124Install
128125
129126
130127
131128\(x\) Aarch64 (android 64 bits \<\< tested!)
132129
133130
134131
135132Build
136133
137134
138135
139136Install
140137
141138> **Note:** After "build" and "install" the cross-compilers and after to do all Infrastructure go to Using LAMW and try to create your first \[New\] LAMW project!
142139
143140
144141If you get an error "Fatal: Cannot find unit system used by fcllaz of package FCL" when trying "Run" \>\> "Build" your project then go to "fpc.cfg" (ex. "C:\lazarus2.0.12\fpc\3.2.0\bin") and:
145142
146143
147144
148145**change:**
149146
150147
151148
152149\#searchpath for units and other system dependent things
153150
154151
155152
156153-FuC:\lazarus2.0.12\fpc\\\$FPCVERSION/units/\$fpctarget
157154
158155
159156
160157-FuC:\lazarus2.0.12\fpc\\\$FPCVERSION/units/\$fpctarget/*
161158
162159
163160
164161-FuC:\lazarus2.0.12\fpc\\\$FPCVERSION/units/\$fpctarget/rtl
165162
166163
167164
168165**to:**
169166
170167
171168
172169\#searchpath for units and other system dependent things
173170
174171
175172
176173-FuC:\lazarus2.0.12\fpc\3.2.0/units/\$fpctarget
177174
178175
179176
180177-FuC:\lazarus2.0.12\fpc\3.2.0/units/\$fpctarget/*
181178
182179
183180
184181-FuC:\lazarus2.0.12\fpc\3.2.0/units/\$fpctarget/rtl
185182
186183
187184And go to Lazarus IDE menu "Tools" \>\> "Options" \>\> "Environment" \>\> \[FPC Source\]
188185
189186
190187
191188**change:**
192189
193190
194191
195192\$(LazarusDir)fpc\\\$(FPCVer)\source
196193
197194
198195
199196**to:**
200197
201198
202199
203200\$(LazarusDir)fpc\3.2.0\source
204201
205202## Infrastructure
206203
207204> **Note:** Only for non-users of LAMW Manager!
208205
209206### Get Java JDK
210207
211208
212209Install * [Java JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
213210
214211### Get Android NDK
215212
216213
217214Install * [r19c](https://github.com/android/ndk/wiki/Unsupported-Downloads)
218215
219216### Get Ant builder
220217
221218
222219Install * [Ant](http://ant.apache.org/bindownload.cgi)
223220
224221
225222
226223Simply extract the zip file to a convenient location...
227224
228225### Get Gradle builder
229226
230227
231228Install * [Gradle 6.6.1](https://gradle.org/next-steps/?version=6.6.1&format=bin)
232229
233230> **Note:** Use the option "extract here" to produce the folder "gradle-6.6.1" in a convenient location...
234231
235232### Get Android SDK
236233
237234
238235Install * [r25.2.5-windows](https://dl.google.com/android/repository/tools_r25.2.5-windows.zip)
239236
240237
241238Install * [r25.2.5-linux](https://dl.google.com/android/repository/tools_r25.2.5-linux.zip)
242239
243240
244241Install * [r25.2.5-macosx](https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip)
245242
246243How to
247244
248245
249246unpacked/install to a "sdk" folder
250247
251248
252249open a command line terminal and go to folder "sdk/tools"
253250
254251
255252run the command \>\> "android update sdk" to open a GUI "SDK Manager"
256253
257254
258255
259256Go to \[Tools\] and keep "as is"
260257
261258
262259
263260Android SDK Tools (installed)
264261
265262\(x\) Android SDK Platform-Tools
266263
267264\(x\) Android SDK Build-Tools 29.0.3 (and others more recent)
268265
269266
270267
271268Go to \[Android R\] and uncheck all!
272269
273270
274271
275272Go to \[Android 10 API 29\] uncheck all and check only
276273
277274
278275
279276(x)SDK Platform
280277
281278
282279
283280Go to \[Extras\] and check:
284281
285282
286283
287284(x)Android Support Repository
288285
289286
290287
291288(x)Google USB Drive (Windows only...)
292289
293290
294291
295292(x)Google Repository
296293
297294
298295
299296(x)Google Play Services
300297
301298
302299
303300\[Install 7 package!\]
304301
305302## Using LAMW
306303
307304### Configure Paths
308305
309306
310307Lazarus IDE menu "Tools" \>\> "\[LAMW\] Android Module Wizard" \>\> "Paths Settings ..."
311308
312309> **Note:** MacOs: path to Java JDK auto setting!
313310
314311### Create and Run your first Android Apk
315312
316313How to
317314
318315
319316From Lazarus IDE select "Project" \>\> "New Project"
320317
321318
322319From displayed dialog select "\[LAMW\] GUI Android Module" and "Ok"
323320
324321
325322Fill the form/dialog fields and "Ok"
326323
327324> **Note:** Path to Workspace" is your projects folder
328325
329326> **Note:** Accept "default" options! (but pay attention to the * signage)
330327
331328
332329"Save" unit1 as/where suggested
333330
334331> **Note:** Search your project folder... you will find many treasures there! (look for lazarus project in ".../jni" folder)
335332
336333
337334From Lazarus IDE select "Run" \>\> "Build"
338335
339336
340337
341338**Success!** Your system is up to produce your first Android Apk!
342339
343340
344341Configure your phone device to [debug mode](https://developer.android.com/studio/debug/dev-options) and plug it to the computer usb port
345342
346343
347344From Lazarus IDE select "Run" \>\> "\[LAMW\] Build Apk and Run"
348345
349346
350347
351348**Congratulations!** You are now an Android Developer!
352349
353350## Other references
354351
355352[Tutorial: My First "Hello Word" App](https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/docs/AppHelloWorld.md)
356353
357354---
358355*From the Free Pascal wiki, page "LAMW", as it stood on 2023-05-22 after a change by WayneSherman, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
359356Category: Android
360357Category: Lazarus

Back to history