Recent

Author Topic: LAWM - Gradle Panic error  (Read 3178 times)

iru

  • Sr. Member
  • ****
  • Posts: 321
LAWM - Gradle Panic error
« on: January 27, 2024, 06:41:56 am »
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

  • New Member
  • *
  • Posts: 49
Re: LAWM - Gradle Panic error
« Reply #1 on: January 27, 2024, 06:52:14 am »
[using the translator]

Take a screenshot of this screen (see image)


Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

iru

  • Sr. Member
  • ****
  • Posts: 321
Re: LAWM - Gradle Panic error
« Reply #2 on: January 27, 2024, 07:50:44 am »
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

  • Sr. Member
  • ****
  • Posts: 321
Re: LAWM - Gradle Panic error
« Reply #3 on: January 27, 2024, 08:05:34 am »
Thanks for the response.

All paths to the NDK, SDK, Java, Ant and Gradle appear to be valid and reasonable....


marcos-ebm

  • New Member
  • *
  • Posts: 49
Re: LAWM - Gradle Panic error
« Reply #4 on: January 27, 2024, 08:14:27 am »
you chose gradle (image), right?

Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

iru

  • Sr. Member
  • ****
  • Posts: 321
Re: LAWM - Gradle Panic error
« Reply #5 on: January 27, 2024, 08:55:07 am »
The only choice was Gradle.

Ian

marcos-ebm

  • New Member
  • *
  • Posts: 49
Re: LAWM - Gradle Panic error
« Reply #6 on: January 27, 2024, 08:59:02 am »
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
Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

iru

  • Sr. Member
  • ****
  • Posts: 321
Re: LAWM - Gradle Panic error
« Reply #7 on: January 27, 2024, 09:39:52 am »
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

  • New Member
  • *
  • Posts: 49
Re: LAWM - Gradle Panic error
« Reply #8 on: January 27, 2024, 05:55:22 pm »
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]
Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

marcos-ebm

  • New Member
  • *
  • Posts: 49
Re: LAWM - Gradle Panic error
« Reply #9 on: January 27, 2024, 06:03:00 pm »
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)
Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

jmpessoa

  • Hero Member
  • *****
  • Posts: 2304
Re: LAWM - Gradle Panic error
« Reply #10 on: January 27, 2024, 09:08:36 pm »

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
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

WayneSherman

  • Full Member
  • ***
  • Posts: 243
Re: LAWM - Gradle Panic error
« Reply #11 on: January 28, 2024, 03:32:48 am »
Environment: 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

  • Sr. Member
  • ****
  • Posts: 321
Re: LAWM - Gradle Panic error
« Reply #12 on: January 28, 2024, 03:45:02 am »
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

  • Full Member
  • ***
  • Posts: 243
Re: LAWM - Gradle Panic error
« Reply #13 on: January 28, 2024, 04:00:28 am »
Gradle 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

  • Sr. Member
  • ****
  • Posts: 321
Re: LAWM - Gradle Panic error
« Reply #14 on: January 29, 2024, 09:11:21 am »
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

 

TinyPortal © 2005-2018