https://kotlinlang.org logo
#compose
Title
# compose
n

Napa Ram

11/25/2021, 12:15 PM
Hi Everyone i migrated one of my module into compose and removed unused dependency after that also all unused library related to appcompact, fragment are showing inside apk analyser can anyone got same issue as i attach screenshot also #android
inside class.dex file constraint fragment appcompact all i want to removed becouse i didn't use in dependency also
c

Csaba Kozák

11/25/2021, 12:22 PM
You can run
./gradlew :app:dependencies
to print to dependency tree, so you can see how it ends up in the APK.
n

Napa Ram

11/25/2021, 12:54 PM
in side material all dependency are adding is there any way to exclude
c

Csaba Kozák

11/25/2021, 12:59 PM
In your second screenshot, you clearly still dependen on the old material library. If you really think you do not need fragment etc, you can exclude transitive dependencies this way. However if you use R8 for your release builds, it will remove all unused classes in a much granular level.