【问题标题】:Integrating DexGuard into Android Studio将 DexGuard 集成到 Android Studio
【发布时间】:2015-04-29 22:04:55
【问题描述】:

你们有没有人设法将 DexGuard 作为插件安装到 Android Studio 中?我正在尝试使用 Settings>Plugin>Install from disk 对 DexGuard 6.1 和 Android Studio 1.1.0 执行此操作,但是 libs/dexguard.jareclipse/com.saikoa.(...).jar 文件都会导致

加载文件((the_selected_jar))的插件描述符失败

错误。

我也尝试过手动操作(将 jar 复制到 Android Studio/plugins 文件夹并编辑 gradle 文件),但也没有运气。

我可以使用 ProGuard,但我想将 DexGuard 用于 encryptstrings 功能。

【问题讨论】:

    标签: android android-studio gradle dexguard


    【解决方案1】:

    我记得 Eclipse 有一个插件,但我认为 DexGuard 与 Gradle 集成,而不是 Android Studio IDE。所以应该不需要安装 .jar 插件。

    来自 DexGuard 文档的示例

    buildscript {
        repositories {
            mavenCentral()
            flatDir { dirs '/YOUR_LOCAL_PATH_HERE/DexGuard6.1/lib' }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:1.0.0'
            classpath ':dexguard:'
        }
    }
    
    apply plugin: 'com.android.application'
    apply plugin: 'dexguard'
    
    android {
        .....
        buildTypes {
            debug {
                proguardFile getDefaultDexGuardFile('dexguard-debug.pro')
                proguardFile 'dexguard-project.txt'
                proguardFile 'proguard-project.txt'
            }
            release {
                proguardFile getDefaultDexGuardFile('dexguard-release.pro')
                proguardFile 'dexguard-project.txt'
                proguardFile 'proguard-project.txt'
            }
        }
    }
    

    【讨论】:

    • DexGuard 是一个商业工具。在我们购买这个工具之前,我们如何测试 dexguard 的性能..
    • 我用过 DexProtector。我发现它同样安全且便宜(每年 800 美元)并且还有 15 天的试用期@harikrishnan
    猜你喜欢
    • 2018-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-08
    • 2017-06-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多