当我在Jenkins上输入“ant debug”时,我总是收到消息:
来自本地计算机的相同命令与Eclipse中的相同代码不会输出上述消息。它总是找到修改后的输入,并从命令行正确创建带有调试密钥的apk。我的目标是在Jenkins上创建一个带调试密钥的APK。
知道为什么“ant debug”显示输出如下?有没有办法强迫apkbuilder创建一个apk?
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
-post-compile:
-obfuscate:
-dex:
[dex] input: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/classes
[dex] input: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/libs/Robotium.jar
[dex] Using Pre-Dexed Robotium-764572c80737d765208bdb367579ac89.jar <- /Users/buildmaster/.jenkins/workspace/my-ci-job-name/libs/Robotium.jar
[dex] No new compiled code. No need to convert bytecode to dalvik format.
-crunch:
[crunch] Crunching PNG Files in source dir: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/res
[crunch] To destination dir: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[aapt] No changed resources or assets. Settings_Tests_New.ap_ remains untouched
-package:
[apkbuilder] No changes. No need to create apk.
-post-package:
-do-debug:
[zipalign] Run cancelled: no changes to input file /Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/Settings_Tests_New-debug-unaligned.apk
[echo] Debug Package: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/Settings_Tests_New-debug.apk
[propertyfile] Updating property file: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/build.prop
[propertyfile] Updating property file: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/build.prop
[propertyfile] Updating property file: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/build.prop
[propertyfile] Updating property file: /Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/build.prop
-post-build:
debug:
BUILD SUCCESSFUL
答案 0 :(得分:0)
我做
rm -rf bin/* gen/*
然后构建
答案 1 :(得分:0)
您可以在构建之前使用此命令进行清理:
ant clean
此外,如果您希望触摸所有文件以更改时间戳我们此命令。然后所有文件都将重建:
触摸
find .
希望这有帮助
答案 2 :(得分:0)
我已将以下目标添加到我的中央build.xml中,以使用一个命令进行清理和构建:
<target name="rebuild" depends="clean, release" />