【问题标题】:Is there a way to make DexGuard exit with an error condition if an error occurs?如果发生错误,有没有办法让 DexGuard 退出并出现错误情况?
【发布时间】:2014-04-18 15:05:18
【问题描述】:

我目前正在 Jenkins 服务器上使用 ANT 构建一个 android 应用程序。

DexGuard 设置为在 custom_rules.xml 中发布时运行。

目前在 DexGuard 尝试转换方法时出现问题:

    [dexguard] Unexpected error while converting:
    [dexguard]   Class       = [o/?]
    [dexguard]   Method      = [?(Ljava/lang/String;)Lo/?;]
    [dexguard]   Exception   = [java.lang.IllegalStateException] (Variable v17 too large for instruction [neg-int v17, v17])
    [dexguard] java.lang.IllegalStateException: Variable v17 too large for instruction [neg-int v17, v17]
    ...
    Stack trace
    ...
    [dexguard] Not converting this method

我的问题是,有没有办法让 DexGuard 以错误状态退出,以便 ANT 或 Jenkins 可以将构建标记为失败?

目前它只是打印堆栈跟踪并继续。

我目前正在使用 Jenkins 的 Text-finder 插件作为后期构建步骤来匹配 DexGuard 异常。如果发现它会将构建降级为失败。

【问题讨论】:

    标签: android ant jenkins proguard dexguard


    【解决方案1】:

    DexGuard 当前忽略了它无法从 Java 字节码转换为 Dalvik 字节码的方法,无论出于何种原因——尤其是损坏的输入代码。在这种情况下,它看起来更像是 DexGuard 本身的一个错误。我们会尽快修复它,我们会考虑添加一个标志以停止并显示错误状态。

    (我是 ProGuard 和 DexGuard 的首席开发人员)

    【讨论】:

      猜你喜欢
      • 2013-04-06
      • 2013-02-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多