简体   繁体   English

Xamarin / Visual Studio 2015:自定义Proguard配置

[英]Xamarin/Visual Studio 2015: Custom Proguard configuration

I need to make a customized Proguard configuration. 我需要定制Proguard配置。 However I cannot find out how to do that. 但是我无法知道如何做到这一点。 When building a new configuration file is copied into the /obj/release/proguard folder. 构建新配置文件时会将其复制到/ obj / release / proguard文件夹中。 How can this configuration file be customized? 如何自定义此配置文件?

  1. Just put your Proguard.cfg into your Project 只需将Proguard.cfg放入项目中即可
  2. Right click on Proguard.cfg > "Build Action" > "ProguardConfiguration" 右键单击Proguard.cfg >“Build Action”>“ProguardConfiguration”

在此输入图像描述

The above answer is 100% correct on how to add the file. 以上答案在如何添加文件方面100%正确。 To make sure you file gets picked up you can check the output logs, it will contain something like this: 为了确保您获取文件,您可以检查输出日志,它将包含以下内容:

ProguardConfigurationFiles:
      {sdk.dir}tools\proguard\proguard-android.txt;
      {intermediate.common.xamarin};
      {intermediate.references};
      {intermediate.application};
         Proguard.cfg;

NOTE: Make sure that you set your MSBuild output verbosity to Detailed for this (Tools > Options > Build and Run) 注意:确保将MSBuild输出详细程度设置为详细信息(工具>选项>构建和运行)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM