如题。在不添加依赖的情况下该如何在一个Module中调用另一个module中的Activity?
使用:
Intent intent = new Intent("myAction");
intent.setClassName("packageName", "packageName+ActivityName");
startActivity(intent);
会出现
android.content.ActivityNotFoundException: Unable to find explicit activity class
求大神赐教!
If you don’t add dependencies, your module will not be compiled into your app. How can you find it? Obviously that's not possible.
Obviously you can’t do this, you can’t find it. Use implicit calls.
1. There is a way to solve it. Using routing, all activities are registered in a routing table, and one key corresponds to one activity
2. Jump through the routing tool class