FileNotFoundException on proguard-rules.pro file

前端 未结 6 1241
逝去的感伤
逝去的感伤 2021-01-17 19:05

I\'m using Android Studio v.1.0 My build file :

  buildTypes {

    debug {
        minifyEnabled false
        proguardFiles getDefaultProguardFile(\'prog         


        
6条回答
  •  梦毁少年i
    2021-01-17 19:52

    I've created my own proguard-android.pro file and that works properly for me :

    -dontwarn org.apache.commons.**
    -dontwarn com.google.**
    -dontwarn com.j256.ormlite**
    -dontwarn org.apache.http**
    
    -keepattributes SourceFile,LineNumberTable
    -keep class com.j256.**
    -keepclassmembers class com.j256.** { *; }
    -keep enum com.j256.**
    -keepclassmembers enum com.j256.** { *; }
    -keep interface com.j256.**
    -keepclassmembers interface com.j256.** { *; }
    
    -keepattributes Signature
    # GSON Library
    # For using GSON @Expose annotation
    -keepattributes *Annotation*
    
    # Gson specific classes
    -keep class sun.misc.Unsafe { *; }
    #-keep class com.google.gson.stream.** { *; }
    
    # Application classes that will be serialized/deserialized over Gson
    -keep class com.google.gson.examples.android.model.** { *; }
    
    # Google Map
    -keep class com.google.android.gms.maps.** { *; }
    -keep interface com.google.android.gms.maps.** { *; }
    

提交回复
热议问题