Programming => Operating Systems => Android => Topic started by: tintinux on May 09, 2016, 04:18:24 pm
Title: [SOLVED] LAMW : building release ?
Post by: tintinux 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 :
C:\lamw\android-sdk-windows\tools\ant\build.xml:1135: The following error occurred while executing this line:
C:\lamw\android-sdk-windows\tools\ant\build.xml:1147: Keystore was tampered with, or password was incorrect: Password verification failed
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
Title: Re: LAMW : building release ?
Post by: freris 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
Title: Re: LAMW : building release ?
Post by: tintinux on June 02, 2016, 02:09:12 pm
OK thanks, it works with all these steps.
Title: Re: [SOLVED] LAMW : building release ?
Post by: A.S. 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?
Title: Re: [SOLVED] LAMW : building release ?
Post by: tintinux 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 !