I am building android application from command line.I need to sign my application in order to install built .apk file on device. For that i need to write key.store and key.alias in ant.properties file. But ant.properties file is missing.So anyone knows please do let me know.
Asked
Active
Viewed 5,675 times
3
-
Are you sure that you are building your apk with ant? Is the a .gradle file in your project? – Casabian Aug 05 '13 at 06:47
-
yes i am building with ant.. There is not such .grade file in root of my project.. – user2652046 Aug 05 '13 at 06:55
-
I manually copied an ant.properties file and then i wrote here key.store and key.alias to sign application. When i build file using ant it made unsigned .apk file. And it also gave an error at the same time in cmd. The error is "The value for keystore is not valid.it must be a single path" – user2652046 Aug 05 '13 at 06:58
-
1run `android update project -p .` – Tarun Aug 05 '13 at 07:27
1 Answers
7
Run android update project -p .
or
Create ant.properties
file manually with the following contents
# This file is used to override default values used by the Ant build system.
#
# This file must be checked in Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
# You can also use it define how the release builds are signed by declaring
# the following properties:
# 'key.store' for the location of your keystore and
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.
android.library.reference.1=###link to any external libraries####
key.alias=android_key
key.store.password==#########
config.logging=false
key.store=#########path to keystore##########
key.alias.password=######

Tarun
- 13,727
- 8
- 42
- 57
-
4This doesn't work for me. When I run android update project -p, I don't get an ant.properties file. What gives? – kmdupr33 May 13 '14 at 15:32
-
@Tarun, Do you know how to use an ant.properties from different directory than platforms/android/ http://stackoverflow.com/questions/29404465/ant-properties-custom-path-when-building-apk – fedmich Apr 02 '15 at 03:23