1 year ago
#348604
nilkash
Android resource not found exception for dynamic feature
Hi I have created one Android application and created one dynamic feature in it. In this dynamic feature in one of the fragments, I am trying to set a custom font for text view.
ResourcesCompat.getFont(requireContext(), R.font.custom_montserrat_bold)
Here custom_montserrat_bold
is present inside the dynamic feature. Inside my activity which hosts this feature fragment I have added the following code
override fun attachBaseContext(base: Context) {
super.attachBaseContext(base)
SplitCompat.installActivity(this)
}
Following is the Android manifest for dynamic feature
<dist:module
dist:instant="false"
dist:title="customModule">
<dist:delivery>
<dist:install-time />
</dist:delivery>
<dist:fusing dist:include="true" />
</dist:module>
I am getting the following error
Fatal Exception: android.content.res.Resources$NotFoundException
Font resource ID #0x7e070001 could not be retrieved.
It is not happening for all devices.
android
android-resources
dynamic-feature-module
0 Answers
Your Answer