LAMW Build Error - Windows lazarus / 43-Android ---------------------------------------------------------------------- bsod · 2024-11-27 12:37 I followed all the steps described in the installation documentation. But i can't compile the android project with LAMW and laz4android2.2.2. Error message: Projeto:Executando comando anterior Compile Reason: State file "C:\Sistemas\Android\HelloWord\obj\controls\controls.compiled" of Project is missing. Executable: C:\Sistemas\Android\HelloWord\jni\before_build.bat CurrentDirectory: C:\Sistemas\Android\HelloWord\jni\ Parameters: Command Line: C:\Sistemas\Android\HelloWord\jni\before_build.bat Parsers: Exibir todas as linhas de saída ProcessID: 46412 ExitCode: 1 ExitStatus: 1 Erro: Código saída 1 ---------------------------------------------------------------------- jmpessoa · 2024-11-27 18:23 Hi, bsod! don't run "before_build.bat"  and "after_build.bat"  by hand..... Try compile and build apk using Lazarus/LAMW menu.... ---------------------------------------------------------------------- bsod · 2024-11-27 23:24 Hi jmpessoa, I don't run the scripts by hand, i'm folowing the HelloWord App tutorial from documentation, and the error happen when i select Run > Build menu. ---------------------------------------------------------------------- jmpessoa · 2024-11-28 00:32 Can you put  here the "LAMW.ini"  from "laz4android2.2.2/config"? ---------------------------------------------------------------------- bsod · 2024-11-29 12:51 Hi jmpessoa, Below the content of file: [NewProject] PathToSmartDesigner=c:\laz4android2.2.2\components\lazandroidmodulewiz ard\android_wizard\smartdesigner PathToJavaTemplates=c:\laz4android2.2.2\components\lazandroidmodulewiz ard\android_wizard\smartdesigner\java PathToAntBin=C:\Android\apache-ant-1.10.15\bin PathToAndroidNDK=C:\Android\android-ndk-r21e NDKRelease=21.4.7075529 NDK=5 PathToJavaJDK=C:\Program Files\Eclipse Adoptium\jdk-21.0.5.11-hotspot PathToAndroidSDK=C:\Android\sdkJ21 PathToGradle=C:\Android\gradle-8.5 PrebuildOSYS=windows-x86_64 PathToWorkspace=C:\Sistemas\Android InstructionSet=1 PackagePrefaceName=org.bsod [JDKPaths] 0=C:\Program Files\Eclipse Adoptium\jdk-21.0.5.11-hotspot [SDKPaths] 0=C:\Android\sdkJ21 [GradlePaths] 0=C:\Android\gradle-8.5 ---------------------------------------------------------------------- af0815 · 2024-11-29 14:34 BTW: Try to avoid using of pathnames with spaces or special characters Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i PathToJavaJDK=C:\Program Files\Eclipse Adoptium\jdk-21.0.5.11-hotspot                                                  ^                    ^ Sometimes programms or scripts have trouble with the handling and splits the commands here. ---------------------------------------------------------------------- karnmedia · 2024-12-15 05:49 How about new LAMW installation? My fresh LAMW installation log. ----------------------- Downloads Laz4android3.4+fpc3.2.2.exe android-ndk-r22b-windows-x86_64 apache-ant-1.10.15-bin gradle-8.10.2-bin openjdk-22+36_windows-x64_bin Install Install Laz4android3.4+fpc3.2.2.exe  on windows11Pro. Install LAMW package via OPM. Laz4Android menu ->tools -> [LAMW] Android Module Wizard  -> path setting JDK C:\LazLAMW\openjdk-23+37_windows-x64_bin\jdk-23 ANT C:\LazLAMW\apache-ant-1.10.15-bin\apache-ant-1.10.15\bin GRADLE C:\LazLAMW\gradle-8.11.1-bin\gradle-8.11.1 NDK C:\LazLAMW\android-ndk-r22b-windows-x86_64\android-ndk-r22b SDK C:\Users\thoma\AppData\Local\Android\Sdk menu ->tools -> [LAMW] Android Module Wizard  -> Build FPC Cross Android -> Build select aarch64, then build, OK. menu ->tools -> [LAMW] Android Module Wizard  -> Build FPC Cross Android -> Install Path to FPC Source C:\LazLAMW\fpcsrc Path to FPC exe C:\LazLAMW\fpc\bin\x86_64-win64 then install FPC Cross Android.. ----------------------- Update LAMW. 1. download the lastest LAMW Package from trunk. 2. extract to C:\laz4android3.4\config\onlinepackagemanager\packages 3. rename or delete the old LAMW folder and name the new one to LAMW. 4. menu ->tools -> [LAMW] Android Module Wizard  -> Build FPC Cross Android -> Build select aarch64, then build, OK. menu ->tools -> [LAMW] Android Module Wizard  -> Build FPC Cross Android -> Install Path to FPC Unit. C:\LazLAMW\fpc\units Path to FPC exe. C:\LazLAMW\fpc\bin\x86_64-win64 then Install. menu -> tools -> clean and rebuild Lazarus IDE with normal profile. 5. Demo folder. C:\laz4android3.4\config\onlinepackagemanager\packages\LAMW\demos ----------------------- testing. Laz4Android Open a Demo projects C:\laz4android3.4\config\onlinepackagemanager\packages\LAMW\demos\GUI\ AppSqliteDemo4\jni\controls.lpi open C:\laz4android3.4\config\onlinepackagemanager\packages\LAMW\demos\GUI\ AppSqliteDemo4\jni\unit1.pas Project -> Project Options -> [LAMW] Android Project Options ->    Change Min SDK Version to suite your needed. (22?) ----------------------- Devices Connection. on Android Studio -> Device Manager -> Pair Devices Using Wi-Fi. On your Android Device Setting->.... Developer options -> Wireless Debugging = On  and then Pair device with QR Code. Connected. ----------------------- Menu -> Run -> [LAMW] Build anroid APK and Run Done. -------------------- Error occurs when try to build some old android project. E: Manifest merger failed : android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. open AndroidManifest.xml on the demo folder. C:\laz4android3.4\config\onlinepackagemanager\packages\LAMW\demos\GUI\ AppSqliteDemo4\AndroidManifest.xml searching for something like ...   add android:exported="true"       save the file and Lazarus -> Menu -> Run -> [LAMW] Build anroid APK and Run again. Done. -------------------------- Remark, I have tried android-ndk r23,r24,r25,r26,r27 with an error message dialog "directory doesn't exist. [1]!" Downgrade to android-ndk v. 22  DONE. ---------------------------------------------------------------------- karnmedia · 2024-12-15 05:58 Quote from: karnmedia on December 15, 2024, 06:49:10 amHow about new LAMW installation? My fresh LAMW installation log. ----------------------- Downloads Laz4android3.4+fpc3.2.2.exe android-ndk-r22b-windows-x86_64 apache-ant-1.10.15-bin gradle-8.10.2-bin openjdk-22+36_windows-x64_bin Install Install Laz4android3.4+fpc3.2.2.exe  on windows11Pro. Install LAMW package via OPM. Laz4Android menu ->tools -> [LAMW] Android Module Wizard  -> path setting JDK C:\LazLAMW\openjdk-23+37_windows-x64_bin\jdk-23 ANT C:\LazLAMW\apache-ant-1.10.15-bin\apache-ant-1.10.15\bin GRADLE C:\LazLAMW\gradle-8.11.1-bin\gradle-8.11.1 NDK C:\LazLAMW\android-ndk-r22b-windows-x86_64\android-ndk-r22b SDK C:\Users\thoma\AppData\Local\Android\Sdk menu ->tools -> [LAMW] Android Module Wizard  -> Build FPC Cross Android -> Build select aarch64, then build, OK. menu ->tools -> [LAMW] Android Module Wizard  -> Build FPC Cross Android -> Install Path to FPC Source C:\LazLAMW\fpcsrc Path to FPC exe C:\LazLAMW\fpc\bin\x86_64-win64 then install FPC Cross Android.. ----------------------- Update LAMW. 1. download the lastest LAMW Package from trunk. 2. extract to C:\laz4android3.4\config\onlinepackagemanager\packages 3. rename or delete the old LAMW folder and name the new one to LAMW. 4. menu ->tools -> [LAMW] Android Module Wizard  -> Build FPC Cross Android -> Build select aarch64, then build, OK. menu ->tools -> [LAMW] Android Module Wizard  -> Build FPC Cross Android -> Install Path to FPC Unit. C:\LazLAMW\fpc\units Path to FPC exe. C:\LazLAMW\fpc\bin\x86_64-win64 then Install. menu -> tools -> clean and rebuild Lazarus IDE with normal profile. 5. Demo folder. C:\laz4android3.4\config\onlinepackagemanager\packages\LAMW\demos ----------------------- Testing. Laz4Android Open a Demo projects C:\laz4android3.4\config\onlinepackagemanager\packages\LAMW\demos\GUI\ AppSqliteDemo4\jni\controls.lpi open C:\laz4android3.4\config\onlinepackagemanager\packages\LAMW\demos\GUI\ AppSqliteDemo4\jni\unit1.pas Project -> Project Options -> [LAMW] Android Project Options ->    Change Min SDK Version to suite your needed. (22?) ----------------------- Devices Connection. on Android Studio -> Device Manager -> Pair Devices Using Wi-Fi. On your Android Device Setting->.... Developer options -> Wireless Debugging = On  and then Pair device with QR Code. Connected. ----------------------- Menu -> Run -> [LAMW] Build anroid APK and Run Done. -------------------- Error occurs when try to build some old android project. E: Manifest merger failed : android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. open AndroidManifest.xml on the demo folder. C:\laz4android3.4\config\onlinepackagemanager\packages\LAMW\demos\GUI\ AppSqliteDemo4\AndroidManifest.xml searching for something like ...   add android:exported="true"       save the file and Lazarus -> Menu -> Run -> [LAMW] Build anroid APK and Run again. Done. -------------------------- Remark, I have tried android-ndk r23,r24,r25,r26,r27 with an error message dialog "directory doesn't exist. [1]!" Downgrade to android-ndk v. 22  DONE.