Recent

Author Topic: [LAMW] Unable to create .apk on Windows 8.1  (Read 2889 times)

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
[LAMW] Unable to create .apk on Windows 8.1
« on: January 30, 2021, 06:33:16 pm »
Hello.

I installed LAMW on my notebook which runs Windows 8.1 and, when I try to create an .apk, I get the error you can see in the attached image.

Do you know what it may depend on?

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: 2301
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #1 on: January 30, 2021, 06:45:51 pm »

Can you make an Apk using "Ant" ?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #2 on: January 30, 2021, 07:00:47 pm »

Can you make an Apk using "Ant" ?

Actually, Ant does not appear at all in the combobox,

Attached you will find two self-explanatory images.
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: 2301
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #3 on: January 30, 2021, 07:24:59 pm »
Add

"/bin"    to  Ant path.... click OK...

After, try a new project again...


Edited: What about java? Remember that you fix it in your another computer...
(Gradle don't work  when java > 13.... and LAMW need java 8 (a.k.a 1.8_xxx)  to support Ant...
« Last Edit: January 30, 2021, 07:41:57 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #4 on: January 30, 2021, 08:30:23 pm »
Add

"/bin"    to  Ant path.... click OK...

After, try a new project again...


Edited: What about java? Remember that you fix it in your another computer...
(Gradle don't work  when java > 13.... and LAMW need java 8 (a.k.a 1.8_xxx)  to support Ant...

Do you know the link to download the correct Java version?

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!


pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #6 on: February 02, 2021, 06:36:52 pm »

from here:
https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/LAMW_Getting_Started.txt

 :-[

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

I have been trying and retrying for days, uninstalling and reinstalling Java and changing Gradle versions, but in the end the error message has always been the same:

Code: Pascal  [Select][+][-]
  1. Building APK (Gradle)... : FAILURE: Build failed with an exception., Errori: 1
  2. Fatal: FAILURE: Build failed with an exception.
  3. * What went wrong:
  4. Execution failed for task ':mergeDebugResources'.
  5. > 8 exceptions were raised by workers:
  6.   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #0: Daemon startup failed
  7.   This should not happen under normal circumstances, please file an issue if it does.
  8.   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #1: Daemon startup failed
  9.   This should not happen under normal circumstances, please file an issue if it does.
  10.   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #2: Daemon startup failed
  11.   This should not happen under normal circumstances, please file an issue if it does.
  12.   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #3: Daemon startup failed
  13.   This should not happen under normal circumstances, please file an issue if it does.
  14.   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #4: Daemon startup failed
  15.   This should not happen under normal circumstances, please file an issue if it does.
  16.   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #5: Daemon startup failed
  17.   This should not happen under normal circumstances, please file an issue if it does.
  18.   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #6: Daemon startup failed
  19.   This should not happen under normal circumstances, please file an issue if it does.
  20.   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #7: Daemon startup failed
  21.   This should not happen under normal circumstances, please file an issue if it does.
  22. * Try:
  23. Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
  24. * Get more help at https://help.gradle.org
  25. Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
  26. Use '--warning-mode all' to show the individual deprecation warnings.
  27. See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings
  28. BUILD FAILED in 4s
  29. 10 actionable tasks: 9 executed, 1 up-to-date
  30. Exception, Errori: 1
  31. Fatal: [Exception] Failed: Cannot build APK!
  32.  

Is there any compatibility issue with Windows 8.1?
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!

loaded

  • Hero Member
  • *****
  • Posts: 825
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #7 on: February 02, 2021, 06:47:29 pm »
Windows 8.1 does not have any problems.
You can probably try to install jdk1.8.0_181 externally in your problem Java Setup.
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #8 on: February 03, 2021, 02:34:51 am »
Quote
I have been trying and retrying for days, uninstalling and reinstalling Java and changing Gradle versions, but in the end the error message has always been the same:

After re-install Java [jdk1.8.0_xxx  recomendated] and Gradle  [6.61 recomendated]   

you need (re)configure the "Environments Variable"  [Control Panel]
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #9 on: February 07, 2021, 12:17:22 pm »
By changing the settings in the way you can see in the first attached image, I have managed to build the .apk.

Nevertheless, when I try to sign the same .apk, I receive an error message originated by zipalign.exe, as you can see in the second attached image.

Any idea about the cause?

P.S. In the folder C:\Windows\System32 I have found no file named zipalign.exe or the like.
« Last Edit: February 07, 2021, 12:35:04 pm by pasquale »
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: 2301
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #10 on: February 07, 2021, 03:29:12 pm »
Maybe you need fix the GRADLE_HOME  "Evironment Variable"  in Control Panel

You can compare your  "gradle-local-apksigner.bat" [edit/open: Notepad] using  the example below:

Quote
set Path=%PATH%;C:\android\sdk\platform-tools;C:\android\sdk\build-tools\29.0.2
set GRADLE_HOME=C:\android\gradle-6.6.1
set PATH=%PATH%;%GRADLE_HOME%\bin
zipalign -v -p 4 C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject12-armeabi-v7a-release-unsigned.apk C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject12-armeabi-v7a-release-unsigned-aligned.apk
apksigner sign --ks C:\android\workspace\AppLAMWNoGUIProject12\applamwnoguiproject12-release.keystore --ks-pass pass:123456 --key-pass pass:123456 --out C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject12-release.apk C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject12-armeabi-v7a-release-unsigned-aligned.apk
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #11 on: February 07, 2021, 04:14:18 pm »
Maybe you need fix the GRADLE_HOME  "Evironment Variable"  in Control Panel

You can compare your  "gradle-local-apksigner.bat" [edit/open: Notepad] using  the example below:

Quote
set Path=%PATH%;C:\android\sdk\platform-tools;C:\android\sdk\build-tools\29.0.2
set GRADLE_HOME=C:\android\gradle-6.6.1
set PATH=%PATH%;%GRADLE_HOME%\bin
zipalign -v -p 4 C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject12-armeabi-v7a-release-unsigned.apk C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject12-armeabi-v7a-release-unsigned-aligned.apk
apksigner sign --ks C:\android\workspace\AppLAMWNoGUIProject12\applamwnoguiproject12-release.keystore --ks-pass pass:123456 --key-pass pass:123456 --out C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject12-release.apk C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject12-armeabi-v7a-release-unsigned-aligned.apk

I couldn't find any GRADLE_HOME  "Evironment Variable"  in Control Panel/Advanced Settings/System.
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: 2301
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #12 on: February 07, 2021, 04:56:49 pm »

Please, create a NEW project and put here your project

"gradle-local-apksigner.bat"

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

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: [LAMW] Unable to create .apk on Windows 8.1
« Reply #13 on: February 07, 2021, 05:32:14 pm »

Please, create a NEW project and put here your project

"gradle-local-apksigner.bat"

Please find attached my project.

The apk was built correctly but I am unable to sign it.
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!

 

TinyPortal © 2005-2018