2017-12-05 6 views
1

Ich weiß, es gibt einige Klassen, die nicht verschleiert werden sollen, aber ich möchte die anderen Klassen umbenannt werden wie Adapter, Dienstprogramme, etc. Ich bin nicht interessant, um das Projekt für jetzt lauffähig zu machen.ProGuard obfuscate Klassen Namen funktioniert nicht

Gradle Datei:

buildscript { 
    repositories { 
    maven { url 'https://maven.fabric.io/public' } 
    } 

    dependencies { 
    classpath 'io.fabric.tools:gradle:1.+' 
    } 
} 
apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 

repositories { 
    jcenter() 
    maven { url 'https://maven.fabric.io/public' } 
    maven { url "https://jitpack.io" } 
} 


android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 
    useLibrary 'org.apache.http.legacy' 

    defaultConfig { 
    multiDexEnabled true 
    applicationId "com.afaqy.gps" 
    minSdkVersion 15 
    targetSdkVersion 17 
    versionCode 39 
    versionName "2.10" 
    generatedDensities = [] 
    } 
    buildTypes { 
    release { 
     minifyEnabled true 
     debuggable false 
     shrinkResources true 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
    debug { 
     debuggable false 
     minifyEnabled true 
     shrinkResources true 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
    } 

    lintOptions { 
    abortOnError false 
    checkReleaseBuilds false 
    } 

    dexOptions { 
    javaMaxHeapSize "4g" //specify the heap size for the dex process 
    } 

    // This is handled for you by the 2.0+ Gradle Plugin 
    aaptOptions { 
    additionalParameters "--no-version-vectors" 
    } 
} 

dependencies { 
    compile 'com.google.code.gson:gson:2.2.4' 
    compile 'com.android.volley:volley:1.0.0' 
    compile 'com.jakewharton:disklrucache:2.0.2' 
    compile 'com.android.support:appcompat-v7:23.0.0' 
    compile 'com.android.support:cardview-v7:23.0.0' 
    compile 'com.baoyz.pullrefreshlayout:library:1.2.0' 
    compile project(':_LibSlideDateTimePicker') 
    compile('io.socket:socket.io-client:0.6.3') { 
    exclude group: 'org.json', module: 'json' 
    } 
    compile 'com.splitwise:tokenautocomplete:[email protected]' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.google.firebase:firebase-messaging:9.4.0' 
    compile 'com.github.paolorotolo:appintro:4.1.0' 
    compile 'com.wang.avi:library:2.1.3' 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
    transitive = true; 
    } 
    compile 'com.android.support:recyclerview-v7:23.1.1' 
    compile 'pl.bclogic:pulsator4droid:1.0.3' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.kyleduo.switchbutton:library:1.4.6' 
    compile 'com.android.support:design:23.0.0' 
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.2' 
    compile 'com.android.support:support-v4:23.+' 
    compile 'com.daimajia.swipelayout:library:[email protected]' 
    compile 'me.leolin:ShortcutBadger:[email protected]' 
    compile 'su.j2e:rv-joiner:1.0.9' 
    compile 'ca.barrenechea.header-decor:header-decor:0.2.8' 
} 
apply plugin: 'com.google.gms.google-services' 

Top-Level-Build-Datei

buildscript { 
    repositories { 
    jcenter() 
    maven { url 'https://maven.fabric.io/public' } 
    } 
    dependencies { 
    classpath 'com.android.tools.build:gradle:1.5.0' 
    classpath 'com.google.gms:google-services:3.0.0' 
    classpath 'io.fabric.tools:gradle:1.+' 
    } 
} 

allprojects { 
    repositories { 
    jcenter() 
    } 
} 

proguard-rules.pro (#Nur Okio der Lage sein, zu erzeugen unterzeichnet apk)

-dontwarn okio.** 

Auch in der Größe der Bibliothek habe ich dies in buildTypes verwendet.

consumerProguardFiles 'proguard-rules.pro' 

Alle Klassen wird mit dem ursprünglichen Namen abgerufen werden.

Irgendeine Idee, was ich falsch gemacht habe? Was habe ich in meiner Konfigurationsdatei verpasst, was Klassennamen nicht verschleiert?

+0

wie zu tun Sie überprüfen Klassen Name nach Build? – mac229

+0

mit http://www.javadecompilers.com/ –

+0

Wie generieren Sie den Build? – elmorabea

Antwort

0

Feste von App-Intro-Bibliothek aus Kompilierung Aktualisierung 'com.github.paolorotolo: appintro: 4.1.0' zu Kompilierung 'com.github.apl-Devs: appintro: v4.2.2'

Verwandte Themen