Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.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
Android Ant在打包apk时似乎忽略了Proguard生成的jar_Android_Ant_Proguard - Fatal编程技术网

Android Ant在打包apk时似乎忽略了Proguard生成的jar

Android Ant在打包apk时似乎忽略了Proguard生成的jar,android,ant,proguard,Android,Ant,Proguard,我有一个Jenkins构建服务器,用于构建带有ant和Android SDK版本18的Android APK。释放APK工作正常。但是,如果通过在project.properties中提供proguard.cfg并通过proguard.config=proguard.cfg指向proguard.cfg来启用proguard,则可能会发生以下情况: 从shell输出和mappings.txt和seeds.txt的存在可以看出,执行Proguard 生成一个apk。但是,由APK生成的堆栈跟踪根本没

我有一个Jenkins构建服务器,用于构建带有ant和Android SDK版本18的Android APK。释放APK工作正常。但是,如果通过在project.properties中提供proguard.cfg并通过proguard.config=proguard.cfg指向proguard.cfg来启用proguard,则可能会发生以下情况:

从shell输出和mappings.txt和seeds.txt的存在可以看出,执行Proguard 生成一个apk。但是,由APK生成的堆栈跟踪根本没有被混淆

有人知道这件事吗?由于某些原因,proguard生成的jar似乎没有包含在apk中

这是我的Proguard配置

-优化过程5 -dontusemixedcaseclassnames -DontskipnonPublicLibraryClass -不要翻转 -冗长的 -优化!代码/简化/算术,!字段/,!类/合并/


然而,在报告的Stacktrace中,它并没有被混淆,这似乎只是一个jenkins配置问题:apk是从bin/目录存档的,但混淆的一个正在发布/

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

#ACRA specifics
# we need line numbers in our stack traces otherwise they are pretty useless
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

# ACRA needs "annotations" so add this... 
-keepattributes *Annotation*

# keep this class so that logging will show 'ACRA' and not a obfuscated name like 'a'.
# Note: if you are removing log messages elsewhere in this file then this isn't necessary
-keep class org.acra.ACRA {
        *;
}

# keep this around for some enums that ACRA needs
-keep class org.acra.ReportingInteractionMode {
   *;
}

# keep this otherwise it is removed by ProGuard
-keep public class org.acra.ErrorReporter
{
public void addCustomData(java.lang.String,java.lang.String);
}

# keep this otherwise it is removed by ProGuard
-keep public class org.acra.ErrorReporter
{
public org.acra.ErrorReporter$ReportsSenderWorker handleSilentException(java.lang.Throwable);
}
de.cellular.crashtest.ObfuscateThisClass -> de.cellular.crashtest.b: