I have one dynamic feature. And when i enable proguard and i try to access fragment
if (splitManager.installedModules.contains(name)) {
val fragment = "com.xxx.xxx.xxxx.AAFragment"
val fr = activity!!.classLoader.loadClass(fragment)
childFragmentManager.beginTransaction()
.replace(R.id.frameLayoutContainer, (fr as Class<Fragment>).newInstance())
.commit()
}
Error:
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.xxx.xxx.xxxx.AAFragment" on path: DexPathList
If i try with disable proguard it works.
I try to keep class fragment in dynamic feature but it does not work.
How can i reach dynamic feature fragment? Thanks