安卓通过反射找Activity

try {
                Class activity = getClassLoader().loadClass("com.huax.basemodel.MainActivity");
                Intent intent = new Intent(this, activity);
                startActivity(intent);
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            }

可用户跨模块跳转

你可能感兴趣的:(Android精华教程,android,反射,跨模块)