android-sdk/tools/ant/build.xml:698: null 返回: 1 [英] android-sdk/tools/ant/build.xml:698: null returned: 1
问题描述
我正在尝试测试 Android 发布版本,以确保不会发生任何意外.尝试从命令行使用 ant 构建时:
I'm trying to test a Android release build to make sure nothing unexpected occurs. While trying to build with ant from the command line:
/usr/local/bin/ant release
...
BUILD FAILED
.../android-sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
.../android-sdk/tools/ant/build.xml:698: null returned: 1
当我查看 build.xml:698
时,问题在于下面的 Proguard 文件.
When I look at build.xml:698
, the issue is with the Proguard file below.
<aapt executable="${aapt}"
command="package"
verbose="${verbose}"
manifest="${out.manifest.abs.file}"
originalManifestPackage="${project.app.package}"
androidjar="${project.target.android.jar}"
rfolder="${gen.absolute.dir}"
nonConstantId="${android.library}"
libraryResFolderPathRefid="project.library.res.folder.path"
libraryPackagesRefid="project.library.packages"
libraryRFileRefid="project.library.bin.r.file.path"
ignoreAssets="${aapt.ignore.assets}"
binFolder="${out.absolute.dir}"
proguardFile="${out.absolute.dir}/proguard.txt">
<res path="${out.res.absolute.dir}" />
<res path="${resource.absolute.dir}" />
</aapt>
我的项目有一个 proguard-project.txt
.重命名为proguard.txt
后,问题依旧.
My project had a proguard-project.txt
. After renaming to proguard.txt
, the problem persists.
我很高兴省略 Proguard 步骤,因为我不使用它.
I'm happy to omit the Proguard step since I don't use it.
我该如何解决这个问题?
How do I resolve this issue?
以防万一:
$ /usr/local/bin/ant -v
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
由于错误,我需要升级 ant,但我不记得错误是什么.我似乎记得它与 Java 7 或 Java 8 有关.
I needed to upgrade ant due to an error, but I don't recall what the error was. I seem to recall it had something to do with Java 7 or Java 8.
推荐答案
有同样的错误.在 https://stackoverflow.com/a/23774435 上找到了修复程序.关闭日食.并运行蚂蚁清理"
Had the same error. found the fix at https://stackoverflow.com/a/23774435. close eclipse. and run 'ant clean'
这篇关于android-sdk/tools/ant/build.xml:698: null 返回: 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!