不需要到AndroidManifest.xml注册微信的activity
Intent intent = new Intent();
ComponentName cmp = new ComponentName(" com.tencent.mm ","com.tencent.mm.ui.LauncherUI");
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setComponent(cmp);
如果还是报
android.content.ActivityNotFoundException: Unable to find explicit activity class { com.tencent.mm /com.tencent.mm.ui.LauncherUI}; have you declared this activity in your AndroidManifest.xml?
那就表示你的设备上没有安装微信