LAWM - Gradle Panic error lazarus / 43-Android ---------------------------------------------------------------------- iru · 2024-01-27 05:41 Gentlefolk Environment: Linux Mint 21.1, Laz, FPC and Android from instructions in    https://wiki.freepascal.org/LAMW_install_linux_fpcupdeluxe Laz environment/IDE built OK, When I use'Run> [LAWM] build APK and  Run to crate a simple APK...... I get a terminal window which displays  a lot of text, displays what appears to be an error message (Red text) and then  closes and the following IDE message/s are displayed: Building APK (Gradle)... : Exit code 1, Errors: 1 Panic: tool stopped with exit code 1. Use context menu to get more information. Does anyone have any suggestions on how stop/freeze the terminal window so I can examine things or explain what/where is the "context menu" so I can get more information? Ian ---------------------------------------------------------------------- marcos-ebm · 2024-01-27 05:52 [using the translator] Take a screenshot of this screen (see image) ---------------------------------------------------------------------- iru · 2024-01-27 06:50 Thank you for your response. I tried that window. All the 'paths' for Java, NDK, SDK, Ant and Gradle resolve to what appear to be perfectly valid locations. Ian. ---------------------------------------------------------------------- iru · 2024-01-27 07:05 Thanks for the response. All paths to the NDK, SDK, Java, Ant and Gradle appear to be valid and reasonable.... ---------------------------------------------------------------------- marcos-ebm · 2024-01-27 07:14 you chose gradle (image), right? ---------------------------------------------------------------------- iru · 2024-01-27 07:55 The only choice was Gradle. Ian ---------------------------------------------------------------------- marcos-ebm · 2024-01-27 07:59 The context menu is when you right click on the error, some options appear However, it usually doesn't show where the error is I stopped using lamw on Linux because of this, I'm using it on Windows on windows you can use lazarus 2.2.2 ---------------------------------------------------------------------- iru · 2024-01-27 08:39 Thank you for your perseverance.... Based on what you explained I right clicked on the 'Message window' error message and got the following (which gives me no new information): Building APK (Gradle)... Executable: /home/iru/android/fpc-lazarus/ccr/lamw-gradle/gradle-6.8.3/bin/gradle CurrentDirectory: /home/iru/android/projects/AppLAMWProject4/ Environment Overrides: GRADLE_HOME=/home/iru/android/fpc-lazarus/ccr/lamw- gradle/gradle-6.8.3/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr /games:/usr/local/games:/snap/bin:/home/iru/android/sdk/platform- tools:/home/iru/android/fpc-lazarus/ccr/lamw-gradle/gradle-6.8.3/bin Parameters: clean build --info Command Line: /home/iru/android/fpc-lazarus/ccr/lamw-gradle/gradle-6.8.3/bin/gradle clean build --info Parsers: gradle ProcessID: 112539 ExitCode: 1 ExitStatus: 256 Error: Exit code 1 ---------------------------------------------------------------------- marcos-ebm · 2024-01-27 16:55 the problem may be in the version of gradle, jdk, sdk you are using see the first image I showed, and use the same version as me SDK 21 NDK 21e JDK 21 GRADLE 8.5 create a folder called ANDROID and throw all these new versions into it and test it [I'm translating directly from my language, sorry for any mistakes] ---------------------------------------------------------------------- marcos-ebm · 2024-01-27 17:03 This was the step by step of how I did it 1 - I installed laz4android2.2.2 (windows only) and installed it in c: 2 - I downloaded lamw, unzipped it into the COMPONENT folder 3 - I installed the bridge LPK, wizard and ide_tools 4 - I downloaded NDK 21e, SDK 21, JDK 21, GRADLE 8.5, ANT and threw it into the C:\android folder One detail is that, when clicking on the NDK21e folder (for example) you already have to go directly to the files, there cannot be a folder in the path (I've had problems with this) ---------------------------------------------------------------------- jmpessoa · 2024-01-27 20:08 Hi, Iru! What is your JDK version?  check here: Java JDK 21: Gradle 8.5 or up Java JDK 17: Gradle 8.2.1 or up Java JDK 11: Gradle 7.6.3 or up Java JDK 1.8: Gradle 6.7 or down ---------------------------------------------------------------------- WayneSherman · 2024-01-28 02:32 Quote from: iru on January 27, 2024, 06:41:56 amEnvironment: Linux Mint 21.1, Laz, FPC and Android from instructions in    https://wiki.freepascal.org/LAMW_install_linux_fpcupdeluxe When I use'Run> [LAWM] build APK and  Run to crate a simple APK...... I get a terminal window which displays  a lot of text, displays what appears to be an error message (Red text) and then  closes and the following IDE message/s are displayed: Instead of using "Run> [LAWM] build APK and  Run" do the following: Use "Run" | "Build" and if the build is successful open a terminal in the project folder and run ./gradle-local-build.sh to build the APKs.  You will be able to see the error messages in the terminal. ---------------------------------------------------------------------- iru · 2024-01-28 02:45 Gentlefolk, Thank you for your responses. Reviewing what was installed and the >Tools>LAMW Paths/Settings I see I am using /usr/lib/jvm/java-11-openjdk-amd64 and Gradle 6.8.3 a combination not supported..... So off I go to download and instal the latest (and complimentary) sdk, ndk, gradle, etc....... This may take some time as I have a lot of things on at the moment... Thank you, Ian. ---------------------------------------------------------------------- WayneSherman · 2024-01-28 03:00 Quote from: iru on January 28, 2024, 03:45:02 amGradle 6.8.3 a combination not supported..... I haven't test this version of gradle since recent LAMW updates.  This is the gradle version that fpcupdeluxe installs at the moment. ---------------------------------------------------------------------- iru · 2024-01-29 08:11 Wayne, Thank you for your suggestion of breaking the build-run process into 2 steps. On executing: ./gradle-local-build.sh The following was displayed. ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. This may not be the original error because I have been fiddling with things and may have bent or broken something.... It would appear the best way forward is build  clean Linux, install all the android-java-whatever bits and pieces again. I battle slowly on.... Ian ---------------------------------------------------------------------- iru · 2024-01-29 10:26 Gentefolk, . I have rebuilt Linux. A check of the 'java'  shows: @iru7280:~$ java --version openjdk 11.0.21 2023-10-17 OpenJDK Runtime Environment (build 11.0.21+9-post- Ubuntu-0ubuntu122.04) OpenJDK 64-Bit Server VM (build 11.0.21+9-post-Ubuntu-0ubuntu122.04, mixed mode, sharing) NowI need to work out what to add, delete, update, etc..... Ian ---------------------------------------------------------------------- iru · 2024-01-29 20:44 Gentlefolk, I have built a new version of Linux Mint. Applied all updates and upgrades. I now have the following Java environment: Ian iru@iru7280:~$ java --version openjdk 11.0.21 2023-10-17 OpenJDK Runtime Environment (build 11.0.21+9-post- Ubuntu-0ubuntu122.04) OpenJDK 64-Bit Server VM (build 11.0.21+9-post-Ubuntu-0ubuntu122.04, mixed mode, sharing ---------------------------------------------------------------------- iru · 2024-01-31 00:41 Gentlefolk, I have commenced adding the various android software systems to my linux system and am becoming a little confused. There is a SDK and a JDK and the numerous explanationS  of the function and content on the WEB. I am more confused than usual.... Can any one explain the function, content and interrelationship of them??? Ian. ---------------------------------------------------------------------- jmpessoa · 2024-01-31 01:09 What about  LAMW  "readme.md" ? https://github.com/jmpessoa/lazandroidmodulewizard ---------------------------------------------------------------------- iru · 2024-01-31 10:57 Thanks for your suggestion. Even with two screens there is a llmited view of things.... I will print it and work my way through it, highlight things, cross things out see enough at once so I can make choices, etc.... Ian ---------------------------------------------------------------------- iru · 2024-02-04 03:22 Attempted to install LAWM as follows{ I have woIrked my through the LAMW document (https://github.com/jmpessoa/lazandroidmodulewizard). I startedat 2, Infrastructure Setup :: only for non-users of "LAWM...." Downloaded and installed    JDK 21, Gradle 8.5 SDKj21 Executed 'sdkmanager "build-tools;34.0.0" "Platforms:android-34" "platform-tools". Downloaded the NDK r21e. Downloaded Gradle 8.5. So I think I have everything required. Used fpcupdeluxe to build a new 'stable' fpc and Laz environment. In the LAZ IDE selected 'Package>Open Package file (.lpk) Selected 'lazandroidmodulewizard-master/android- bridges/tfpandroidbridge_pack.lpk In the package install window selected 'Install', etc. When prompted selected 'Rebuild the IDE', etc the recompile/build of Laz commenced. Failed-Linking error in the lazarus .LPR..... make[2]: *** [Makefile:4362: lazarus] Error 1 make[1]: *** [Makefile:4801: ide] Error 2 *** [Makefile(3116,0) Error: linker: ide] Error 2 lazarus.pp(171,1) Error: Error while linking lazarus.pp(171,1) Verbose: There were 1 errors compiling module, stopping Verbose: Compilation aborted I will think about things.... Ian ---------------------------------------------------------------------- iru · 2024-02-15 09:18 Gentlefolk, I have had little time to work on this... However I have managed to borrow a laptop with windows 10. Will load up LAZ and LAWM and see if I can get the job done..... Ian. ---------------------------------------------------------------------- marcos-ebm · 2024-02-15 10:36 [using the translator] download version 2.4.0c of fpcupdeluxe, as the stable version of lazaruas is version 3 after installing lazarus/fpc, install ARM - ANDROID After that, you install LAMW (manually like you did) When starting a new lamw project, always choose the ARMv7a+VFPv3 option