Recent

Author Topic: [LAMW] Is it safe for me to invest in Ant as my .apk builder?  (Read 2085 times)

pasquale

  • Sr. Member
  • ****
  • Posts: 271
    • Esposito Software
[LAMW] Is it safe for me to invest in Ant as my .apk builder?
« on: January 09, 2021, 11:03:11 pm »
Hello, I have started to explore Android programming using LAMW and Ant as my .apk builder. Unfortunatly, I've had some problems with Gradle that I'm unable to overcome, so I'm forced to give up on it.

I was wondering whether it may be risky to concentrate my efforts on Ant instead of Gradle, considering that the latter is what the majority of Android developers are using today. Do you think that apps compiled using Ant may stop working in the foreseeable future?

Thanks in advance.
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: [LAMW] Is it safe for me to invest in Ant as my .apk builder?
« Reply #1 on: January 10, 2021, 02:39:30 am »

For simple test and toy projects is ok....

But gradle is the way to go! 

(Ant is limited to working with "online" libraries...)

Your initial difficulties will be overcome!

What you need now is to build and test in debug mode!

Soon you will be able to sign your app!

Move on!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jcmontherock

  • Sr. Member
  • ****
  • Posts: 347
Re: [LAMW] Is it safe for me to invest in Ant as my .apk builder?
« Reply #2 on: January 10, 2021, 10:45:21 am »
Try Basic for Android (B4A): https://www.b4x.com/...
Windows 11 UTF8-64 - Lazarus 4.6-64 - FPC 3.2.2

pasquale

  • Sr. Member
  • ****
  • Posts: 271
    • Esposito Software
Re: [LAMW] Is it safe for me to invest in Ant as my .apk builder?
« Reply #3 on: January 10, 2021, 11:46:02 am »
Try Basic for Android (B4A): https://www.b4x.com/...

I have been using Delphi and Lazarus for years and years and I feel very comfortable with its interface and code syntax. Basic for Android would be something completely new to me. Thanks anyway.
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

pasquale

  • Sr. Member
  • ****
  • Posts: 271
    • Esposito Software
Re: [LAMW] Is it safe for me to invest in Ant as my .apk builder?
« Reply #4 on: January 10, 2021, 05:04:33 pm »

Soon you will be able to sign your [Gradle] app!


Right now, signing a Gradle app is an enormous headache for me. I have been struggling with this issue for a couple of days unsuccessfully.

As long as I am unable to sign my apps, I can't move forward.

This is what I do step by step:

  • I create a new project selecting LAMW [GUI] Android Module with the following parameters:
    Project Name=Gradle_App
    Default Package Name=espositosoftware.gradle_app
    Apk Builder=Gradle
    Ndk Api=22
    Min Device Api=18
    Target Api=28
    Architecture=ARMv7a+VFPv3
    Android Theme=DeviceDefault
  • I save AndroidModule1, which is created by default.
  • I place a button on the form and some simple code in its Click event, and I save the changes.
  • I compile the project and then click on [LAMW] Build Android Apk and Run. I wait for the .apk to be built, then I close Lazarus (please note that, since no device or emulator is connected, my app cannot be run, so I just close Lazarus after receiving the message that the .apk was created successfully).
  • I open the Gradle_App folder and make sure that Gradle_App-armeabi-v7a-release-unsigned.apk was created in the release folder.
  • I type my personal data in the keytool_input.txt file.
  • I execute release-keystore.bat and then gradle-local-apksigner.bat (the attempt to sign the .apk returns what you can see in the attached screenshot). Please note that the DOS window ends in a colon. It looks like it is waiting for a password to be entered (Keystore password for signer #1:), but if I press any key nothing happens. The only key I can press is Enter, which closes the DOS window.
  • in the release folder I now have a second .apk file, namely Gradle_App-armeabi-v7a-release-unsigned-aligned.apk. So Gradle_App-armeabi-v7a-release.apk was not created.

Why does this happen?

Thanks

Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: [LAMW] Is it safe for me to invest in Ant as my .apk builder?
« Reply #5 on: January 10, 2021, 07:27:17 pm »
Quote
in the release folder I now have a second .apk file, namely Gradle_App-armeabi-v7a-release-unsigned-aligned.apk.

Great!

We're almost done!

Little missing!

At this point maybe @segator and @ADiV can help us....



Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: [LAMW] Is it safe for me to invest in Ant as my .apk builder?
« Reply #6 on: January 11, 2021, 05:49:57 am »
SOLVED!

Please, update the LAMW or simply the file "androidwizard_intf.pas"
ref:
https://github.com/jmpessoa/lazandroidmodulewizard/tree/master/android_wizard

Maybe, using LAMW Manager or some git client or simply copying.... [to LAMW folder ".....\android_wizard"]

Then re-install the "lazandroidwizardpack.lpk" [".....\android_wizard"] before you create a new project!

Hint: Close any LAMW project [and open a default lazarus project] before re-install a LAMW package....

Thank you!!!
« Last Edit: January 11, 2021, 06:58:49 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018