4

I have an android app which needs to be signed using a specific keystore for it to be able to communicate with another app. I see that I can put the keystore file in a specific location for eclipse to use it. I don't find any documentation on how to configure the keystore in build.xml for ant builds though.

4 Answers 4

2

Per my research so far, the only way is to achieve this is to copy the keystore file to the default android keystore path (which is generally located under ~/.android directory.

Sign up to request clarification or add additional context in comments.

Comments

1

For Ant builds you just need to add lines like these to the build.properties file:

key.store=c:/users/me/my-release-key.keystore key.alias=release_alias key.store.password=MyStorePassword key.alias.password=MyKeyPassword 

assuming that your build.xml is based on the main_rules.xml that comes with the SDK

1 Comment

This works only for release builds. Unfortunately, it appears there is no way simple way to specify custom keystore for debug builds.
0

I'm using Maven for that and it works fine. I have configured multiple build profiles like "release", "devel" etc. signed with different keys. If you want to use Maven look for maven android plugin.

1 Comment

You won't notice it unless you use Google Maps, this relies on the correct debug keystore being used.
0

In eclipse it is done through window-preferences-android-build-custom debug keystore.

As you can see from there, default debug keystore is located in .android/debug.keystore at your homedir (~ at linuxes and c:\Users\whatevah on windowses).

So you can replace default ~/.android/debug.keystore with your custom.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.