如果你在webview里面,死活都没有掉起支付宝.跳转过去就挂掉,
第一步,请你在模拟器跑一遍, 如果你发现你网页返回,报错是:net::ERR_UNKNOWN_URL_SCHEME
那么复制这段代码到你的项目里就OK
WebViewClient webViewClient = new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView wv, String url) { if(url == null) return false; try { if(url.startsWith("weixin://") || url.startsWith("alipays://") || url.startsWith("mailto://") || url.startsWith("tel://") //其他自定义的scheme ) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent); return true; } } catch (Exception e) { //防止crash (如果手机上没有安装处理某个scheme开头的url的APP, 会导致crash) return false; } //处理http和https开头的url wv.loadUrl(url); return true; } };