Recent

Author Topic: [SOLVED] LAMW : building release ?  (Read 4632 times)

tintinux

  • Sr. Member
  • ****
  • Posts: 325
    • Gestinux
[SOLVED] LAMW : building release ?
« on: May 09, 2016, 04:18:24 pm »
Hi

To build a release APK, I suppose we first need to generate the file <app-name>-release.keystore with release-keystore.bat generated in the project directory.

First trap : if your system is not english, you must replace the "y" in keytool_input.txt by the first letter of the translation of "yes"

Then, a small change was needed in release-keystore.bat, in the last line : replace "keytool" by "%JAVA_HOME%\bin\keytool" because unless you alter the PATH, keytool is not found.

After these changes, I have successfully created  the  <app-name>-release.keystore file

But, when I execute Build-release.bat it fails ending with :

Code: DOS  [Select][+][-]
  1. -post-package:
  2.  
  3. -release-prompt-for-password:
  4.  
  5. -release-nosign:
  6.  
  7. -release-sign:
  8.      [echo] Signing final apk...
  9.  
  10. BUILD FAILED
  11. C:\lamw\android-sdk-windows\tools\ant\build.xml:1135: The following error occurred while executing this line:
  12. C:\lamw\android-sdk-windows\tools\ant\build.xml:1147: Keystore was tampered with, or password was incorrect: Password verification failed
  13.  
  14. Total time: 9 seconds

I have not changed the password 123456 in keytool_input.txt
As I said above I have had to change in the file only the "yes".
Where can be the solution ?

Thanks for help







« Last Edit: June 02, 2016, 02:09:41 pm by tintinux »
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

freris

  • New Member
  • *
  • Posts: 48
  • A Retired hobbist programmer from Greece
Re: LAMW : building release ?
« Reply #1 on: May 13, 2016, 03:13:13 pm »
Dear tintinux

I found a solution for myself.  See below what I did:

First download apache-ant-1.9.7 from http://ant.apache.org and put it somewhere in your Hard disk.

1. edit file release-keystore.bat  and check - set correct parameters / paths to your own - Warning !!

set JAVA_HOME=F:\Program Files\Java\jdk1.8.0_25
cd E:\laz4android\LamwProjects\Spla
keytool -genkey -v -keystore Spla-release.keystore -alias splaaliaskey -keyalg RSA -keysize 2048 -validity 10000 < E:\laz4android\LamwProjects\Spla\keytool_input.txt

then run release-keystore.bat  to create a keystore
***************************************************************
2. edit file keytool_input.txt and set your own details
***************************************************************
3. edit file ant.properties  and set your desired password

key.store=spla-release.keystore
key.alias=splaaliaskey
key.store.password=your desired password   <---- here
key.alias.password=your desired password again  <---- here too
****************************************************************

4.  edit file build-release.bat  and check - set correct parameters / paths to your own - Warning !!

set Path=%PATH%;E:\laz4android\apache-ant-1.9.7\bin
set JAVA_HOME=F:\Program Files\Java\jdk1.8.0_25
cd E:\laz4android\LamwProjects\Spla
ant clean release -Dout.final.file=bin\Spla.apk

then run build-release.bat

and get xxxx.apk
****************************************************************
5. edit file install.bat and set names / paths to your own - Warning !!

cd E:\laz4android\LamwProjects\Spla\bin
C:\Android\android-sdk\platform-tools\adb install -r Spla.apk
cd ..
pause

then run to install on device or emulator

I hope help you.....

sorry for my bad English

freris
As I get older, the more I learn !!

tintinux

  • Sr. Member
  • ****
  • Posts: 325
    • Gestinux
Re: LAMW : building release ?
« Reply #2 on: June 02, 2016, 02:09:12 pm »
OK thanks, it works with all these steps.
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

A.S.

  • Jr. Member
  • **
  • Posts: 76
Re: [SOLVED] LAMW : building release ?
« Reply #3 on: June 02, 2016, 09:10:30 pm »
About replacing "y" in keytool_input.txt: Is it really a problem? tintinux, what the system do you use?

tintinux

  • Sr. Member
  • ****
  • Posts: 325
    • Gestinux
Re: [SOLVED] LAMW : building release ?
« Reply #4 on: June 03, 2016, 04:40:21 pm »
Hi Anton,

Yes I confirm this is a problem in the current version.

I'm using Windows 8, localized in French and by default keytool writes messages and expects confirmations in this language.
With y on the 9th line of keytool_input.txt, the command retries 20 times and fails !
With o it works fine.

I found the solution : add this in release-keystore.bat and it will always work in english !

Code: DOS  [Select][+][-]
  1. set JAVA_TOOL_OPTIONS=-Duser.language=en

Best regards
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

A.S.

  • Jr. Member
  • **
  • Posts: 76
Re: [SOLVED] LAMW : building release ?
« Reply #5 on: June 03, 2016, 09:28:52 pm »
Thank you for advice!

 

TinyPortal © 2005-2018