suchen

Heim  >  Fragen und Antworten  >  Hauptteil

android-studio - Cordova Android项目如何做代码混淆

我想修改build.gradle配置 可是这个文件明确写了
// GENERATED FILE! DO NOT EDIT!
可是还是试了试:

if (cdvReleaseSigningPropertiesFile) {


        signingConfigs {
            release {
                // These must be set or Gradle will complain (even if they are overridden).
                keyAlias = ""
                keyPassword = "__unset"
                // And these must be set to non-empty in order to have the signing step added to the task graph.
                storeFile = null
                storePassword = "__unset"
            }
        }
        buildTypes {
            release {
                minifyEnabled true // 设置代码进行混淆
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                signingConfig signingConfigs.release
            }
        }
        addSigningProps(cdvReleaseSigningPropertiesFile, signingConfigs.release)
    }
    

可是并没有起作用,我故意在proguard-rules.pro里加一些错误的语法 也没有报错 ;
十分紧急,求大神指点!

伊谢尔伦伊谢尔伦2773 Tage vor414

Antworte allen(1)Ich werde antworten

  • 天蓬老师

    天蓬老师2017-04-17 17:50:42

    可以考虑使用gulp,我们当前项目使用的就是gulp

    Antwort
    0
  • StornierenAntwort