Eclipse Build下的Android Build / Proguard日志

时间:2012-04-02 14:12:58

标签: android eclipse logging export proguard

我一直在构建Adroid应用程序,但一直使用ANT命令行模型来构建发行版本。

我决定使用eclispe EXPORT模型开始构建我的Android版本APK,它似乎正在工作。

然而,尽管如此,我没有看到构建中的日志,所以我不确定构建的PROGUARD部分是否真的有效。 APK已创建,并且看起来已签名,但我觉得能够真正看到构建输出更加舒服,特别是在使用ANT构建时通常会成为控制台输出一部分的proguard步骤。

当我选择导出并且什么也看不见时,我在Eclipse中打开一个控制台窗口,当我尝试使用Android查找有关Eclipse的构建日志记录的信息时,我同样一无所获。

编写导出命令的sysout / build日志在哪里?

2 个答案:

答案 0 :(得分:1)

通过使用普通的Ant配置对话框然后运行(Clean,Debug)的常规目标,我在eclipse控制台选项卡中看到了DX输出...你将拥有与target = release和proguard相同的一般体验在这个过程中迈出一步..

  1. Eclipse /外部工具配置
  2. tab = targets - 选择要包含的目标(清理,调试)
  3. 验证目标执行顺序
  4. 运行ant并查看控制台....
  5. 如果您运行释放目标,您将看到下面显示dx的proguard。

    eclipse console:

           [dx] associated EnclosingMethod attribute. This class was probably produced by a
           [dx] compiler that did not target the modern .class file format. The recommended
           [dx] solution is to recompile the class from source, using an up-to-date compiler
           [dx] and without specifying any "-target" type options. The consequence of ignoring
           [dx] this warning is that reflective operations on this class will incorrectly
           [dx] indicate that it is *not* an inner class.
           [dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
           [dx] (org.apache.commons.logging.LogFactory$6) that doesn't come with an
           [dx] associated EnclosingMethod attribute. This class was probably produced by a
           [dx] compiler that did not target the modern .class file format. The recommended
           [dx] solution is to recompile the class from source, using an up-to-date compiler
           [dx] and without specifying any "-target" type options. The consequence of ignoring
           [dx] this warning is that reflective operations on this class will incorrectly
           [dx] indicate that it is *not* an inner class.
           [dx] 2 warnings
    -crunch:
       [crunch] Crunching PNG Files in source dir: C:\cygwin\home\rob\src\gpsclipper\res
       [crunch] To destination dir: C:\cygwin\home\rob\src\gpsclipper\bin\res
       [crunch] Crunched 0 PNG files to update cache
    -package-resources:
         [aapt] Current build type is different than previous build: forced aapt run.
         [aapt] Creating full resource package...
    -package:
         [echo] --apk outfldr:C:\cygwin\home\rob\src\gpsclipper\bin  resourcefile: gpsclipper.ap_
         [echo]             apkfilepath: C:\cygwin\home\rob\src\gpsclipper\bin\gpsclipper-debug-unaligned.apk  verbose: false
         [echo]              Dxpath: C:\cygwin\home\rob\src\gpsclipper\bin\classes.dex
         [echo]              srcFldrPth: C:\cygwin\home\rob\src\gpsclipper\src jarRFID: ${project.libraries.jars} 
         [echo]             nativeFldr: ${project.libraries.libs}
    [apkbuilder] Current build type is different than previous build: forced apkbuilder run.
    [apkbuilder] Creating gpsclipper-debug-unaligned.apk and signing it with a debug key...
    -post-package:
    -do-debug:
     [zipalign] Running zip align on final apk...
         [echo] Debug Package: C:\cygwin\home\rob\src\gpsclipper\bin\gpsclipper-debug.apk
    [propertyfile] Updating property file: C:\cygwin\home\rob\src\gpsclipper\bin\build.prop
    [propertyfile] Updating property file: C:\cygwin\home\rob\src\gpsclipper\bin\build.prop
    [propertyfile] Updating property file: C:\cygwin\home\rob\src\gpsclipper\bin\build.prop
    [propertyfile] Updating property file: C:\cygwin\home\rob\src\gpsclipper\bin\build.prop
    -post-build:
    debug:
    -pre-clean:
    clean:
       [delete] Deleting directory C:\cygwin\home\rob\src\gpsclipper\bin
       [delete] Deleting directory C:\cygwin\home\rob\src\gpsclipper\gen
    BUILD SUCCESSFUL
    Total time: 54 seconds
    

答案 1 :(得分:0)

在包含项目信息的工作空间中,您将找到一个名为Proguard的目录,该目录包含所有构建日志和映射,可以为您提供有关已执行操作和结果的信息。