LAMW Installation lazarus / 43-Android ---------------------------------------------------------------------- gitchef · 2022-04-07 09:59 Hi All, I have a problem using LAMW. Having used different installation methods, such as fpcupdeluxe or LAMW_Manager, I always get the same result, when building an app (reqardless if it's one of the demos or a simple new program).  This is the output of the error message, building the demo AppActivityLauncherDemo1 with a LAMW-Manager installation: 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 Messages, Hints: 2Verbose: Selected chip architecture: armeabi-v7aVerbose: Taking libraries from folder: C:\LAMW_Manager\LAMW\lazandroidmodulewiz ard\demos\GUI\AppActivityLauncherDemo1\libs\armeabi-v7aVerbose: Found library: libcontrols.soNote: Duplicate unit "controls" in "controls", orphaned ppu "C:\LAMW_Manager\LAMW\lazandroidmodulewizard\demos\GUI\Ap pActivityLauncherDemo1\obj\controls\controls.o"Note: Duplicate unit "controls" in "LCLBase 2.0.12", ppu="C:\lamw_manager\LAMW\LAMW4Windows\lazarus_trunk\lcl\units\arm- android\controls.ppu", source="C:\lamw_manager\LAMW\LAMW4Windows\lazar us_trunk\lcl\controls.pp"Hint: (11030) Start of reading config file C: \lamw_manager\LAMW\LAMW4Windows\fpc\3.2.0\bin\i386-win32\fpc.cfgHint: (11031) End of reading config file C:\lamw_manager\LAMW\LAMW4Windows\fpc\3.2.0\bin\i386-win32\fpc.cfgFree Pascal Compiler version 3.2.0 [2022/04/07] for armCopyright (c) 1993-2020 by Florian Klaempfl and others(1002) Target OS: Android for ARMEL(3104) Compiling controls.lprC:\LAMW_Manager\LAMW\lazandroidmodul ewizard\demos\GUI\AppActivityLauncherDemo1\jni\controls.lpr(564,39) Hint: (5024) Parameter "reserved" not usedC:\LAMW_Manager\LAMW\lazandr oidmodulewizard\demos\GUI\AppActivityLauncherDemo1\jni\controls.lpr(58 1,42) Hint: (5024) Parameter "reserved" not usedC:\LAMW_Manager\LAMW\l azandroidmodulewizard\demos\GUI\AppActivityLauncherDemo1\jni\controls. lpr(7,31) Hint: (5023) Unit "And_jni_Bridge" not used in controls(9009) Assembling controls(9022) Compiling resource C:\LAMW_Ma nager\LAMW\lazandroidmodulewizard\demos\GUI\AppActivityLauncherDemo1\o bj\controls\controls.or(9015) Linking C:\LAMW_Manager\LAMW\lazandroidm odulewizard\demos\GUI\AppActivityLauncherDemo1\libs\armeabi- v7a\libcontrols.so(1008) 695 lines compiled, 0.9 sec(1022) 5 hint(s) issuedBuildfile: C:\LAMW_Manager\LAMW\lazandroidmodulewizard\demos\GUI \AppActivityLauncherDemo1\build.xml     [copy] Copying 12 files to C:\ LAMW_Manager\LAMW\lazandroidmodulewizard\demos\GUI\AppActivityLauncher Demo1\src\com\example\appactivitylauncherdemo1\android-29 -check- env: [checkenv] Android SDK Tools Revision 25.2.5 [checkenv] Installed at C:\lamw_manager\LAMW\sdk -setup:     [echo] Project Name: AppActivityLauncherDemo1  [gettype] Project Type: Application -pre- clean: clean:   [delete] Deleting directory C:\LAMW_Manager\LAMW\lazan droidmodulewizard\demos\GUI\AppActivityLauncherDemo1\bin   [delete] Deleting directory C:\LAMW_Manager\LAMW\lazandroidmodulewizard\demos\G UI\AppActivityLauncherDemo1\gen[getlibpath] Library dependencies:[getlibpath] No Libraries   [subant] No sub-builds to iterate on -set-mode-check: -set-debug-files: -check-env: [checkenv] Android SDK Tools Revision 25.2.5 [checkenv] Installed at C:\lamw_manager\LAMW\sdk -setup:     [echo] Project Name: AppActivityLauncherDemo1  [gettype] Project Type: Application -set- debug-mode: -debug-obfuscation-check: -pre-build: -build- setup:[getbuildtools] Using latest Build Tools: 29.0.3     [echo] Resolving Build Target for AppActivityLauncherDemo1...[gettarget] Project Target:   Android 10[gettarget] API level:        29     [echo] ----------     [echo] Creating output directories if needed...    [mkdir] Created dir: C:\LAMW_Manager\LAMW\lazandroidmodul ewizard\demos\GUI\AppActivityLauncherDemo1\bin    [mkdir] Created dir: C:\LAMW_Manager\LAMW\lazandroidmodulewizard\demos\GUI\AppActivityLaunc herDemo1\bin\res    [mkdir] Created dir: C:\LAMW_Manager\LAMW\lazandro idmodulewizard\demos\GUI\AppActivityLauncherDemo1\bin\rsObj    [mkdir] Created dir: C:\LAMW_Manager\LAMW\lazandroidmodulewizard\demos\GUI\App ActivityLauncherDemo1\bin\rsLibs    [mkdir] Created dir: C:\LAMW_Manag er\LAMW\lazandroidmodulewizard\demos\GUI\AppActivityLauncherDemo1\gen    [mkdir] Created dir: C:\LAMW_Manager\LAMW\lazandroidmodulewizard\dem os\GUI\AppActivityLauncherDemo1\bin\classes    [mkdir] Created dir: C: \LAMW_Manager\LAMW\lazandroidmodulewizard\demos\GUI\AppActivityLaunche rDemo1\bin\dexedLibs     [echo] ----------     [echo] Resolving Dependencies for AppActivityLauncherDemo1...[dependency] Ordered libraries:[dependency] [dependency] ------------------     [echo] ----------     [echo] Building Libraries with 'debug'...   [subant] No sub-builds to iterate on -code-gen:[mergemanifest] Merging AndroidManifest files into one.[mergemanifest] Manifest merger disabled. Using project manifest only.     [echo] Handling aidl files...     [aidl] No AIDL files to compile.     [echo] ----------   [echo] Handling RenderScript files...     [echo] ----------     [echo] Handling Resources...     [aapt] Generating resource IDs...   [echo] ----------     [echo] Handling BuildConfig class...[buildconfig] Generating BuildConfig class. -pre- compile: -compile:    [javac] Compiling 14 source files to C:\LAMW_Man ager\LAMW\lazandroidmodulewizard\demos\GUI\AppActivityLauncherDemo1\bi n\classes    [javac] C:\LAMW_Manager\LAMW\lazandroidmodulewizard\demos \GUI\AppActivityLauncherDemo1\src\com\example\appactivitylauncherdemo1 \android-29\jForm.java:3057: error: cannot find symbol    [javac]              {   _bitmap.compress(Bitmap.CompressFormat.WEBP_LOSSLESS, 90, out);} // needs targetSdkVersion API 30, comment out this line if your targetSdkVersion is less than 30    [javac]                                                        ^    [javac]   symbol:   variable WEBP_LOSSLESS    [javac]   location: class CompressFormat    [javac] Note: Some input files use or override a deprecated API.    [javac] Note: Recompile with -Xlint:deprecation for details.    [javac] Note: C:\LAMW_Manager\LAMW\lazandroidmodulewizard\demos\GUI\AppActivityLaunc herDemo1\src\com\example\appactivitylauncherdemo1\android- 29\jIntentManager.java uses unchecked or unsafe operations.    [javac] Note: Recompile with -Xlint:unchecked for details.    [javac] 1 error BUILD FAILEDC:\lamw_manager\LAMW\sdk\tools\ant\build.xml:716: The following error occurred while executing this line:C:\lamw_manager\LAMW\sdk\tools\ant\build.xml:730: Compile failed; see the compiler error output for details. Total time: 2 secondsException, Errors: 1Fatal: [Exception] Failed: Cannot build APK!  I have no clue, what is going wrong here. Any hints? The OS is Windows 11, but get the same results on a different computer with Windows 10. I have used the latest version of LAMW_Manager which is 0.3.1.6-beta and fpcupdeluxe V2.2.0i. Thanks a lot for your help. Stefan ---------------------------------------------------------------------- dseligo · 2022-04-07 10:19 It looks that your error is here: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     [javac] C:\LAMW_Manager\LAMW\lazandroidmodulewizard\demos\GUI\AppActivityLaunc herDemo1\src\com\example\appactivitylauncherdemo1\android- 29\jForm.java:3057: error: cannot find symbol    [javac]              {   _bitmap.compress(Bitmap.CompressFormat.WEBP_LOSSLESS, 90, out);} // needs targetSdkVersion API 30, comment out this line if your targetSdkVersion is less than 30 It says that needs API 30 and you have 29. Create new project (menu Project, New Project, LAMW [GUI] Android Module) and just try to build it when it is empty (menu Run, [LAMW] Build Android Apk and Run). Sometimes demos in LAMW needs a bit adjusting before using them. ---------------------------------------------------------------------- gitchef · 2022-04-07 11:45 I have created a new and empty project, but it produced the exact same error message. ---------------------------------------------------------------------- lazpas · 2022-04-08 01:24 Open the file /android_wizard/smartdesigner/java/jform.java in lamw,and comment it out ---------------------------------------------------------------------- jmpessoa · 2022-04-08 02:34 Hi gitchef! Fixed!  Please, update "jForm.java" from LAMW github! (copy it to  LAMW folder ".....\android_wizard\smartdesigner\java") Thanks to All! ---------------------------------------------------------------------- gitchef · 2022-04-08 07:37 Problem fixed  Thank you all for your help and thank you very much jmpessoa for your great work.