Search code examples
androidantandroid-4.2-jelly-bean

Ant fails to build signed apk after updating to android v20


Quite a bit of weird error is happening after I upgraded android and eclipse tools to v20

building through Ant stopped working with the following error upon creating the signed apk

 BUILD FAILED
 C:\Programs\Android\tools\ant\build.xml:1097: The following error occurred while executing this line:
 C:\Programs\Android\tools\ant\build.xml:1109: Cannot recover key

Any idea what could've changed when doing the upgrade to android JB components, and how can this be rectified?

I appreciate any help...


Solution

  • I just spent about 5hr on this topic... It all came down to a space after the password.

    Apparently in the prior version it was trimming the password and in the current version it does not.

    So making sure you don't have spaces at the end of the lines might make the difference. That solved the problem for us - no need to go to JDK7 (although it seems to build and work just fine anyway, at least from ant).