[Fixed] lazarus LAMW release-keystore.bat Could not Generate .keystore Files

Using LAMW, I found that I can’t generate APK with signature, after tracing, I found that the release-keystore.bat generated by LAMW has LC_ALL=C before keytool causing illegal generation of .keystore file, after deleting it, I can generate keystore file and APK with signature normally.

set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60
set JAVA_TOOL_OPTIONS=-Duser.language=en
cd D:\fpcupdeluxe3\projects\LAMWProjects\AppLAMWProject6
LC_ALL=C keytool -genkey -v -keystore applamwproject6-release.keystore -alias applamwproject6.keyalias -keyalg RSA -keysize 2048 -validity 10000 < D:\fpcupdeluxe3\projects\LAMWProjects\AppLAMWProject6\keytool_input.txt
echo off
echo Signature file created previously, remember that if you delete this file and it was uploaded to Google Play, you will not be able to upload another app without this signature.

The file release-keystore.bat is automatically generated when creating a new APK, just remove LC_ALL=C from line 2219 of lamw\android_wizard\AndroidWizard_intf.pas and recompile lazarus.

Modified as:

The recompiled lazarus generates the correct release-keystore.bat when creating a new Android project project, so you don’t have to modify release-keystore.bat every time you create a new project.

Similar Posts: