所以我只是将一个活动移动到我们的第一个动态模块中。我正在尝试使用以下代码导航到该活动:
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
任何想法我做错了什么?