未找到活动异常从fragmentActivity启动Internet应用程序时

时间:2014-04-17 14:57:58

标签: android

public void callWebView(String aUrl) {

    Intent intent = new Intent(Intent.ACTION_VIEW);

    intent.setData(Uri.parse(aUrl));
    try {


        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        myContext.startActivity(intent);
    } catch (ActivityNotFoundException ex) {
        ex.printStackTrace();
    }

}

Log cat:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=www.twitter.com typ=url flg=0x10000000 }

0 个答案:

没有答案