Android Proguard and mapping.txt未创建

Android Proguard and mapping.txt未创建,android,proguard,Android,Proguard,我试图在发布模式下签署应用程序后创建Proguard,但出现了一些问题,因为我无法在其中创建Proguard文件夹nad mapping.txt 这是我的密码:- # To enable ProGuard in your project, edit project.properties # to define the proguard.config property as described in that file. # # Add project specific ProGuard rule

我试图在发布模式下签署应用程序后创建Proguard,但出现了一些问题,因为我无法在其中创建Proguard文件夹nad mapping.txt

这是我的密码:-

# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-dishoomit.txt

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}
#To avoid changing names of methods invoked on layout's onClick.
# Uncomment and add specific method names if using onClick on layouts
#-keepclassmembers class * {
# public void onClickButton(android.view.View);
#}
#To maintain custom components names that are used on layouts XML:
-keep public class * extends android.view.View {
    public <init>(android.content.Context);
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
    public void set*(...);
}
#Keep classes that are referenced on the AndroidManifest
-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 com.android.vending.licensing.ILicensingService
-keep public class * extends android.preference.Preference
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
-keep interface org.apache.** { *; }

-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 *;
}

   <proguard>
                    @${proguard.config}
                    -injars       ${project.jars}
                    -outjars      "${obfuscated.jar.file}"
                    -libraryjars  ${android.libraryjars}
                    -dump         "${obfuscate.absolute.dir}/dump.txt"
                    -printseeds   "${obfuscate.absolute.dir}/seeds.txt"
                    -printusage   "${obfuscate.absolute.dir}/usage.txt"
                    -printmapping "${obfuscate.absolute.dir}/mapping.txt"
  </proguard>
#要在项目中启用ProGuard,请编辑project.properties
#如该文件所述定义proguard.config属性。
#
#在此处添加特定于项目的ProGuard规则。
#默认情况下,此文件中的标志附加到指定的标志
#在${sdk.dir}/tools/proguard/proguard-android.txt中
#您可以通过更改ProGuard来编辑包含路径和顺序
#在project.properties中包含属性。
#
#有关详细信息,请参阅
#   http://developer.android.com/guide/developing/tools/proguard.html
#在此处添加任何特定于项目的保留选项:
proguard.config=${sdk.dir}/tools/proguard/proguard android.txt:proguard-dishoomit.txt
#如果您的项目使用带JS的WebView,请取消注释以下内容
#并为JavaScript接口指定完全限定的类名
#类别:
#-keepclassmembers类fqcn.of.javascript.interface.for.webview{
#公众*;
#}
#避免更改在布局的onClick上调用的方法的名称。
#如果在布局上使用onClick,则取消注释并添加特定的方法名称
#-keepclassmembers类*{
#公共void onclick按钮(android.view.view);
#}
#要维护在XML布局上使用的自定义组件名称,请执行以下操作:
-keep public class*扩展了android.view.view{
public(android.content.Context);
public(android.content.Context、android.util.AttributeSet);
public(android.content.Context,android.util.AttributeSet,int);
公共无效集*(…);
}
#保留AndroidManifest上引用的类
-keep public class*扩展android.app.Activity
-keep public class*扩展android.app.Application
-keep public class*扩展了android.app.Service
-keep public class*扩展了android.content.BroadcastReceiver
-keep public class*扩展了android.content.ContentProvider
-保持公共类com.android.vending.licensing.ILicensingService
-keep public class*扩展了android.preference.preference
-keep public class*扩展了android.support.v4.app.Fragment
-keep public class*扩展了android.app.Fragment
-keep类android.support.v4.*{*;}
-保留android.support.v4.*{*;}
-保留接口org.apache.*{*;}
-KeepClassSwithMemberNames类*{
本地人;
}
-keepclassswithmembers类*{
public(android.content.Context、android.util.AttributeSet);
}
-keepclassswithmembers类*{
public(android.content.Context,android.util.AttributeSet,int);
}
-keepclassmembers类*扩展了android.app.Activity{
public void*(android.view.view);
}
-keepclassmembers枚举*{
公共静态**[]值();
公共静态**valueOf(java.lang.String);
}
-keep class*实现android.os.Parcelable{
公开静态最终android.os.Parcelable$Creator*;
}
@${proguard.config}
-injars${project.jars}
-outjars“${obfuscated.jar.file}”
-libraryjars${android.libraryjars}
-转储“${obfuscate.absolute.dir}/dump.txt”
-printseeds“${obfuscate.absolute.dir}/seeds.txt”
-printusage“${obfuscate.absolute.dir}/usage.txt”
-printmapping“${obfuscate.absolute.dir}/mapping.txt”

我不明白为什么我不能创造它。请给我一些提示或参考。

使用Ant,您应该在构建日志中看到ProGuard的一些输出。然后,您将在项目中获得一个文件bin/proguard/mapping.txt

使用Eclipse时,您不会看到任何构建日志,但如果启用了ProGuard,您将在项目中获得一个文件ProGuard/mapping.txt