所以我只是将一个活动移到了我们的第一个dynamicModule中。我正在尝试使用以下代码导航到该活动:
private enum class ACTIVITIES(val location: String) {
EXAMPLE_ACTIVITY("com.example.feature_member_home.ExampleActivity"),//com.example.feature_member_home
REFERRAL_SELECTION_ACTIVITY("com.sofi.mobile.feature_example.ReferralSelectionActivity")//com.sofi.mobile.feature_referrals.ReferralSelectionActivity
}
@Throws(LinkageError::class, ExceptionInInitializerError::class, ClassNotFoundException::class)
fun locateReferralSelectionActivity(context: Context): Intent {
try {
return Intent(context, Class.forName(ACTIVITIES.REFERRAL_SELECTION_ACTIVITY.location))
} catch (e: Exception) {
throw e
}
}
但是行Class.forName(ACTIVITIES.REFERRAL_SELECTION_ACTIVITY.location)
给出了错误ClassNotFoundException on path DexPathList
有什么想法我在做什么错吗?