[LAMW] Unable to create .apk on Windows 8.1 lazarus / 43-Android ---------------------------------------------------------------------- pasquale · 2021-01-30 17:33 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 ---------------------------------------------------------------------- jmpessoa · 2021-01-30 17:45 Can you make an Apk using "Ant" ? ---------------------------------------------------------------------- pasquale · 2021-01-30 18:00 Quote from: jmpessoa on January 30, 2021, 06:45:51 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. ---------------------------------------------------------------------- jmpessoa · 2021-01-30 18:24 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... ---------------------------------------------------------------------- pasquale · 2021-01-30 19:30 Quote from: jmpessoa on January 30, 2021, 07:24:59 pmAdd "/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 ---------------------------------------------------------------------- jmpessoa · 2021-01-30 20:01 from here: https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/LAMW_Ge tting_Started.txt http://www.oracle.com/technetwork/java/javase/downloads/jdk8- downloads-2133151.html ---------------------------------------------------------------------- pasquale · 2021-02-02 17:36 Quote from: jmpessoa on January 30, 2021, 09:01:58 pm from here: https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/LAMW_Ge tting_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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Building APK (Gradle)... : FAILURE: Build failed with an exception., Errori: 1Fatal: FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':mergeDebugResources'.> 8 exceptions were raised by workers:  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #0: Daemon startup failed  This should not happen under normal circumstances, please file an issue if it does.  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #1: Daemon startup failed  This should not happen under normal circumstances, please file an issue if it does.  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #2: Daemon startup failed  This should not happen under normal circumstances, please file an issue if it does.  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #3: Daemon startup failed  This should not happen under normal circumstances, please file an issue if it does.  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #4: Daemon startup failed  This should not happen under normal circumstances, please file an issue if it does.  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #5: Daemon startup failed  This should not happen under normal circumstances, please file an issue if it does.  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #6: Daemon startup failed  This should not happen under normal circumstances, please file an issue if it does.  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.1-5326820-windows Daemon #7: Daemon startup failed  This should not happen under normal circumstances, please file an issue if it does.* Try: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.* Get more help at https://help.gradle.orgDeprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.Use '--warning-mode all' to show the individual deprecation warnings.See https://docs.gradle.or g/6.6.1/userguide/command_line_interface.html#sec:command_line_warning sBUILD FAILED in 4s10 actionable tasks: 9 executed, 1 up-to- dateException, Errori: 1Fatal: [Exception] Failed: Cannot build APK!  Is there any compatibility issue with Windows 8.1? ---------------------------------------------------------------------- loaded · 2021-02-02 17:47 Windows 8.1 does not have any problems. You can probably try to install jdk1.8.0_181 externally in your problem Java Setup. ---------------------------------------------------------------------- jmpessoa · 2021-02-03 01:34 QuoteI 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] ---------------------------------------------------------------------- pasquale · 2021-02-07 11:17 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. ---------------------------------------------------------------------- jmpessoa · 2021-02-07 14:29 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: Quoteset 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\outp uts\apk\release\AppLAMWNoGUIProject12-armeabi-v7a-release-unsigned.apk C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\A ppLAMWNoGUIProject12-armeabi-v7a-release-unsigned-aligned.apk apksigner sign --ks C:\android\workspace\AppLAMWNoGUIProject12\applamw noguiproject12-release.keystore --ks-pass pass:123456 --key-pass pass:123456 --out C:\android\workspace\AppLAMWNoGUIProject12\build\out puts\apk\release\AppLAMWNoGUIProject12-release.apk C:\android\workspac e\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject1 2-armeabi-v7a-release-unsigned-aligned.apk ---------------------------------------------------------------------- pasquale · 2021-02-07 15:14 Quote from: jmpessoa on February 07, 2021, 03:29:12 pmMaybe 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: Quoteset 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\outp uts\apk\release\AppLAMWNoGUIProject12-armeabi-v7a-release-unsigned.apk C:\android\workspace\AppLAMWNoGUIProject12\build\outputs\apk\release\A ppLAMWNoGUIProject12-armeabi-v7a-release-unsigned-aligned.apk apksigner sign --ks C:\android\workspace\AppLAMWNoGUIProject12\applamw noguiproject12-release.keystore --ks-pass pass:123456 --key-pass pass:123456 --out C:\android\workspace\AppLAMWNoGUIProject12\build\out puts\apk\release\AppLAMWNoGUIProject12-release.apk C:\android\workspac e\AppLAMWNoGUIProject12\build\outputs\apk\release\AppLAMWNoGUIProject1 2-armeabi-v7a-release-unsigned-aligned.apk I couldn't find any GRADLE_HOME  "Evironment Variable"  in Control Panel/Advanced Settings/System. ---------------------------------------------------------------------- jmpessoa · 2021-02-07 15:56 Please, create a NEW project and put here your project "gradle-local-apksigner.bat" ---------------------------------------------------------------------- pasquale · 2021-02-07 16:32 Quote from: jmpessoa on February 07, 2021, 04:56:49 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.