在 build.properties 中没有找到 key.store 和 key.alias 属性

2022-08-31 20:56:10

我正在使用我的Android应用程序进行1步构建。ant-release

我的 build.properties 看起来像这样:

application.package=xxxxx
key.store=sonr
key.alias=sonr labs
key.store.password=xxxx
key.alias.password=xxxx

当我运行ant-release时,除了应用程序签名之外,一切都很好。我收到错误:

-release-prompt-for-password:

-release-nosign:
     [echo] No key.store and key.alias properties found in build.properties.
     [echo] Please sign /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/SONR-release-unsigned.apk manually
     [echo] and run zipalign from the Android SDK tools.
[propertyfile] Updating property file: /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/build.prop
[propertyfile] Updating property file: /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/build.prop
[propertyfile] Updating property file: /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/build.prop
[propertyfile] Updating property file: /Users/syalam/Documents/git/joeborn-sonr/sonr/bin/build.prop

如何解决此问题?

PS. 我按照本教程操作,将我的构建过程 http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html


答案 1

我最近遇到了这个问题,我认为该教程已过时...

etc 指令需要位于名为 ant.properties 的文件中。不再有名为 build.properties 的文件。key.alias


答案 2

任何这类问题的最终答案都在android-sdk/tools/ant/build中.xml

文档已 http://developer.android.com/guide/developing/building/building-cmdline.html


推荐