how to remove the ICU4J library from Android Studio

712 views Asked by At

After creating an Android Studio project, the ICU4J library will be added to the project Automatically.it increases the APK file size to 15 MB. I do not use this library, but I can not delete it.

You can see inside the APK Analyzer too: APK Analyzer for ICU4J library

How to remove the ICU4J library from the project

2

There are 2 answers

4
Muzammil Husnain On BEST ANSWER

Check your Gradle file dependencies if there is dependency to icu4j remove it or if you are not using icu4j you can add

release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'),
                'proguard-rules.pro'
    }

in your build configurations to remove unused code from your application.

or You can find shrinking code and resources documentation

2
Sushin Pv On

Go to App Gradle. Here you can find the all libraries using on your project.

Remove the compile code of ICU4J library from dependencies

dependencies {
    //Remove the unwanted libraries / dependencies 
}