最近app上線,因爲上述問題,被google市場給拒了。web
看到這個,點進Google help Center article,應該知道問題所在了。直接在項目裏找到使用webview的地方。找到webviewClient ,看看你有沒有處理onReceivedSslError方法。怎麼處理的。是否是按照規範。MD,要忙了。直接貼代碼app
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { final SslErrorHandler mHandler ; mHandler= handler; AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setMessage("ssl證書驗證失敗"); builder.setPositiveButton("繼續", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mHandler.proceed(); } }); builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { mHandler.cancel(); } }); builder.setOnKeyListener(new DialogInterface.OnKeyListener() { @Override public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) { mHandler.cancel(); dialog.dismiss(); return true; } return false; } }); AlertDialog dialog = builder.create(); dialog.show(); }
要讓用戶選擇。ide
若是不肯定具體哪一個類或者哪一個sdk出現問題,能夠直接找google技術小組聯繫ui
https://support.google.com/faqs/answer/6346016google