Reputation: 2779
I have third party libraries in my project. I added Proguard my project and i make release project but my third party libraries crashes.
How to keep third party libraries?
-keep class com.ice.restring.** { *; } // dont work
a library I used as an example; https://github.com/hamidness/restring/tree/master/restring
Upvotes: 2
Views: 1741
Reputation: 73
The third party library is something the supportive unctional library which is developed by some other people or organization other than the android.
Many third party libraries are available in the web for different-different functionalities and features.
For example if you are dealing with image loading and showing in to a ImageView, you can use Piccaso library or glide library.
As according to your need, you can use different-different third party libraries in your app.
In Android Studio, its very simple to add any library. Just you need to add the third party library dependency to your android project's application level gradle and sync. Android Studio will automatically download that library and add to your android project. Now you need to go through the api doc of that third party library and you are ready to use in your project.
You can add third party libraries in build.gradle(Module:app)
in build.gradle under android {
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Upvotes: 1
Reputation: 870
preserve all public API
-keep public class 3rd_party_lib_name.** {
public *;}
preserve public classes, but not necessarily their fields or methods
-keep public class 3rd_party_lib_name.**
Upvotes: 2