Android - Proguard with httpcore and httpmime using Android Studio and Gradle

后端 未结 2 830
长发绾君心
长发绾君心 2021-02-07 14:12

I\'m developing an app with Android Studio 1.0.2 and Gradle 1.0.0 using the Apache libraries httpmime and httpcore for multipart entities. Here\'s my <

相关标签:
2条回答
  • 2021-02-07 14:34

    Try This

    -dontwarn org.apache.commons.**
    -keep class org.apache.http.** { *; }
    -dontwarn org.apache.http.**
    -dontwarn com.squareup.okhttp.**
    -dontwarn okio.**
    -dontwarn retrofit2.**
    -keep class retrofit2.** { *; }
    
    0 讨论(0)
  • 2021-02-07 14:48

    Well i am using like this

    -dontwarn org.apache.commons.**
    -keep class org.apache.http.** { *; }
    -dontwarn org.apache.http.**
    

    Also i am compiling using jar inside my libs folder

    compile files('libs/httpmime-4.3.5.jar')
    compile files('libs/httpclient-4.3.5.jar')
    compile files('libs/httpclient-cache-4.3.5.jar')
    compile files('libs/httpcore-4.3.2.jar')
    

    instead of using from maven

    0 讨论(0)
提交回复
热议问题