0

当我在 Jenkins 上键入“ant debug”时,我总是收到如下消息:

  • [aapt] 没有更改的资源。R.java 和 Manifest.java 保持不变。
  • [dex] 没有新的编译代码。无需将字节码转换为 dalvik 格式。
  • [aapt] 没有更改的资源或资产。
  • [apkbuilder] 没有变化。无需创建 apk。

来自我的本地计算机的相同命令针对来自 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
4

3 回答 3

0

我已将以下目标添加到我的中央 build.xml 以使用一个命令进行清理和构建:

<target name="rebuild" depends="clean, release" />
于 2015-02-26T13:47:37.547 回答
0

我愿意

rm -rf bin/* gen/*

然后构建

于 2013-08-22T02:22:09.163 回答
0

您可以在构建之前使用此命令进行清理:

蚂蚁清洁

此外,如果您希望触摸所有文件以更改时间戳,请使用此命令。然后所有文件将重建:

触碰find .

希望这可以帮助

于 2013-08-22T02:37:39.840 回答