Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
启用proguard时Android构建失败_Android_Proguard - Fatal编程技术网

启用proguard时Android构建失败

启用proguard时Android构建失败,android,proguard,Android,Proguard,我试图在我的项目上启用proguard,但构建经常失败,我遵循本教程: 玩弄了配置,但运气不佳:( Buildfile:C:\00\work\workspace\Mobile\TesApp\build.xml -设置模式检查: -设置释放模式: -释放模糊检查: -设置: [echo]如果需要,正在创建输出目录。。。 [echo]正在收集TesApp的信息。。。 [设置]Android SDK工具第19版 [设置]项目目标:Android 4.0.3 [设置]API级别:15 [设置] [设置

我试图在我的项目上启用proguard,但构建经常失败,我遵循本教程:

玩弄了配置,但运气不佳:(

Buildfile:C:\00\work\workspace\Mobile\TesApp\build.xml
-设置模式检查:
-设置释放模式:
-释放模糊检查:
-设置:
[echo]如果需要,正在创建输出目录。。。
[echo]正在收集TesApp的信息。。。
[设置]Android SDK工具第19版
[设置]项目目标:Android 4.0.3
[设置]API级别:15
[设置]
[设置]------------------
[设置]解析库依赖项:
[设置]没有库依赖项。
[设置]
[设置]------------------

[设置]API您可能希望取消中建议的优化步骤

这是因为政府不建议这样做


还可以尝试使用示例中的
-dontwarn
指令。

您可能希望取消中建议的优化步骤

这是因为政府不建议这样做

还可以尝试使用示例中的
-dontwarn
指令

Buildfile: C:\00\work\workspaces\Mobile\TesApp\build.xml

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:

-setup:
     [echo] Creating output directories if needed...
     [echo] Gathering info for TesApp...
    [setup] Android SDK Tools Revision 19
    [setup] Project Target: Android 4.0.3
    [setup] API level: 15
    [setup] 
    [setup] ------------------
    [setup] Resolving library dependencies:
    [setup] No library dependencies.
    [setup] 
    [setup] ------------------
    [setup] API<=15: Adding annotations.jar to the classpath.
    [setup] 
    [setup] ------------------

-build-setup:

-pre-build:

-code-gen:
     [echo] ----------
     [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] Found Deleted Target File
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.

-pre-compile:

-compile:
    [javac] Compiling 1 source file to C:\00\work\workspaces\Mobile\TesApp\bin\classes

-dex-obfuscate:

-dex-no-obfuscate:

-post-compile:

-obfuscate:
   [delete] Deleting: C:\00\work\workspaces\Mobile\TesApp\obf\original.jar
   [delete] Deleting: C:\00\work\workspaces\Mobile\TesApp\obf\obfuscated.jar
      [jar] Building jar: C:\00\work\workspaces\Mobile\TesApp\obf\original.jar
 [proguard] ProGuard, version 4.7
 [proguard] Reading input...
 [proguard] Reading program jar [C:\00\work\workspaces\Mobile\TesApp\obf\original.jar]
 [proguard] Reading program jar [C:\android-sdk-windows\tools\support\annotations.jar]
 [proguard] Reading library jar [C:\android-sdk-windows\platforms\android-15\android.jar]
 [proguard] Initializing...
 [proguard] Ignoring unused library classes...
 [proguard]   Original number of library classes: 3145
 [proguard]   Final number of library classes:    337
 [proguard] Printing kept classes, fields, and methods...
 [proguard] Shrinking...
 [proguard] Printing usage to [C:\00\work\workspaces\Mobile\TesApp\obf\usage.txt]...
 [proguard] Removing unused program classes and class elements...
 [proguard]   Original number of program classes: 54
 [proguard]   Final number of program classes:    40
 [proguard] Optimizing...
 [proguard]   Number of finalized classes:                 23
 [proguard]   Number of vertically merged classes:         0   (disabled)
 [proguard]   Number of horizontally merged classes:       0   (disabled)
 [proguard]   Number of removed write-only fields:         0   (disabled)
 [proguard]   Number of privatized fields:                 0   (disabled)
 [proguard]   Number of inlined constant fields:           0   (disabled)
 [proguard]   Number of privatized methods:                3
 [proguard]   Number of staticized methods:                1
 [proguard]   Number of finalized methods:                 39
 [proguard]   Number of removed method parameters:         0
 [proguard]   Number of inlined constant parameters:       1
 [proguard]   Number of inlined constant return values:    0
 [proguard]   Number of inlined short method calls:        2
 [proguard]   Number of inlined unique method calls:       13
 [proguard]   Number of inlined tail recursion calls:      0
 [proguard]   Number of merged code blocks:                0
 [proguard]   Number of variable peephole optimizations:   132
 [proguard]   Number of arithmetic peephole optimizations: 0   (disabled)
 [proguard]   Number of cast peephole optimizations:       0
 [proguard]   Number of field peephole optimizations:      0
 [proguard]   Number of branch peephole optimizations:     26
 [proguard]   Number of string peephole optimizations:     0
 [proguard]   Number of simplified instructions:           6
 [proguard]   Number of removed instructions:              15
 [proguard]   Number of removed local variables:           4
 [proguard]   Number of removed exception blocks:          0
 [proguard]   Number of optimized local variable frames:   50
 [proguard] Shrinking...
 [proguard] Removing unused program classes and class elements...
 [proguard]   Original number of program classes: 40
 [proguard]   Final number of program classes:    40
 [proguard] Optimizing...
 [proguard]   Number of finalized classes:                 0
 [proguard]   Number of vertically merged classes:         0   (disabled)
 [proguard]   Number of horizontally merged classes:       0   (disabled)
 [proguard]   Number of removed write-only fields:         0   (disabled)
 [proguard]   Number of privatized fields:                 0   (disabled)
 [proguard]   Number of inlined constant fields:           0   (disabled)
 [proguard]   Number of privatized methods:                0
 [proguard]   Number of staticized methods:                0
 [proguard]   Number of finalized methods:                 0
 [proguard]   Number of removed method parameters:         1
 [proguard]   Number of inlined constant parameters:       0
 [proguard]   Number of inlined constant return values:    0
 [proguard]   Number of inlined short method calls:        0
 [proguard]   Number of inlined unique method calls:       0
 [proguard]   Number of inlined tail recursion calls:      0
 [proguard]   Number of merged code blocks:                0
 [proguard]   Number of variable peephole optimizations:   3
 [proguard]   Number of arithmetic peephole optimizations: 0   (disabled)
 [proguard]   Number of cast peephole optimizations:       0
 [proguard]   Number of field peephole optimizations:      0
 [proguard]   Number of branch peephole optimizations:     0
 [proguard]   Number of string peephole optimizations:     0
 [proguard]   Number of simplified instructions:           0
 [proguard]   Number of removed instructions:              123
 [proguard]   Number of removed local variables:           0
 [proguard]   Number of removed exception blocks:          0
 [proguard]   Number of optimized local variable frames:   0
 [proguard] Shrinking...
 [proguard] Removing unused program classes and class elements...
 [proguard]   Original number of program classes: 40
 [proguard]   Final number of program classes:    40
 [proguard] Optimizing...
 [proguard]   Number of finalized classes:                 0
 [proguard]   Number of vertically merged classes:         0   (disabled)
 [proguard]   Number of horizontally merged classes:       0   (disabled)
 [proguard]   Number of removed write-only fields:         0   (disabled)
 [proguard]   Number of privatized fields:                 0   (disabled)
 [proguard]   Number of inlined constant fields:           0   (disabled)
 [proguard]   Number of privatized methods:                0
 [proguard]   Number of staticized methods:                0
 [proguard]   Number of finalized methods:                 0
 [proguard]   Number of removed method parameters:         0
 [proguard]   Number of inlined constant parameters:       0
 [proguard]   Number of inlined constant return values:    0
 [proguard]   Number of inlined short method calls:        0
 [proguard]   Number of inlined unique method calls:       0
 [proguard]   Number of inlined tail recursion calls:      0
 [proguard]   Number of merged code blocks:                0
 [proguard]   Number of variable peephole optimizations:   0
 [proguard]   Number of arithmetic peephole optimizations: 0   (disabled)
 [proguard]   Number of cast peephole optimizations:       0
 [proguard]   Number of field peephole optimizations:      0
 [proguard]   Number of branch peephole optimizations:     0
 [proguard]   Number of string peephole optimizations:     0
 [proguard]   Number of simplified instructions:           0
 [proguard]   Number of removed instructions:              5
 [proguard]   Number of removed local variables:           0
 [proguard]   Number of removed exception blocks:          0
 [proguard]   Number of optimized local variable frames:   0
 [proguard] Shrinking...
 [proguard] Removing unused program classes and class elements...
 [proguard]   Original number of program classes: 40
 [proguard]   Final number of program classes:    40
 [proguard] Optimizing...
 [proguard]   Number of finalized classes:                 0
 [proguard]   Number of vertically merged classes:         0   (disabled)
 [proguard]   Number of horizontally merged classes:       0   (disabled)
 [proguard]   Number of removed write-only fields:         0   (disabled)
 [proguard]   Number of privatized fields:                 0   (disabled)
 [proguard]   Number of inlined constant fields:           0   (disabled)
 [proguard]   Number of privatized methods:                0
 [proguard]   Number of staticized methods:                0
 [proguard]   Number of finalized methods:                 0
 [proguard]   Number of removed method parameters:         0
 [proguard]   Number of inlined constant parameters:       0
 [proguard]   Number of inlined constant return values:    0
 [proguard]   Number of inlined short method calls:        0
 [proguard]   Number of inlined unique method calls:       0
 [proguard]   Number of inlined tail recursion calls:      0
 [proguard]   Number of merged code blocks:                0
 [proguard]   Number of variable peephole optimizations:   0
 [proguard]   Number of arithmetic peephole optimizations: 0   (disabled)
 [proguard]   Number of cast peephole optimizations:       0
 [proguard]   Number of field peephole optimizations:      0
 [proguard]   Number of branch peephole optimizations:     0
 [proguard]   Number of string peephole optimizations:     0
 [proguard]   Number of simplified instructions:           0
 [proguard]   Number of removed instructions:              0
 [proguard]   Number of removed local variables:           0
 [proguard]   Number of removed exception blocks:          0
 [proguard]   Number of optimized local variable frames:   0
 [proguard] Obfuscating...
 [proguard] Printing mapping to [C:\00\work\workspaces\Mobile\TesApp\obf\mapping.txt]...
 [proguard] Writing output...
 [proguard] Preparing output jar [C:\00\work\workspaces\Mobile\TesApp\obf\obfuscated.jar]
 [proguard]   Copying resources from program jar [C:\00\work\workspaces\Mobile\TesApp\obf\original.jar]
 [proguard]   Copying resources from program jar [C:\android-sdk-windows\tools\support\annotations.jar]
 [proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [annotations.jar:META-INF/MANIFEST.MF])
 [proguard] Printing classes to [C:\00\work\workspaces\Mobile\TesApp\obf\dump.txt]...

-dex:
      [dex] Found Deleted Target File
      [dex] Converting compiled files and external libraries into C:\00\work\workspaces\Mobile\TesApp\bin\classes.dex...
       [dx] no classfiles specified

BUILD FAILED
C:\android-sdk-windows\tools\ant\build.xml:818: The following error occurred whi
le executing this line:
C:\android-sdk-windows\tools\ant\build.xml:820: The following error occurred whi
le executing this line:
C:\android-sdk-windows\tools\ant\build.xml:832: The following error occurred whi
le executing this line:
C:\android-sdk-windows\tools\ant\build.xml:278: null returned: 1