简体   繁体   English

为什么在 Google Play 商店上传应用程序时会出现 SslErrorHandler?

[英]Why getting SslErrorHandler when uploading app in Google Play Store?

I have uploaded the release APK to Google Playstore, but it is always rejected because of SslErrorHandler .我已经将发布的 APK 上传到 Google Playstore,但总是因为SslErrorHandler被拒绝。

        @Override
        public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) {
            final AlertDialog.Builder builder = new AlertDialog.Builder(Registration.this);
            String message = "SSL Certificate error.";

            message += " Do you want to continue anyway?";

            builder.setTitle("SSL Certificate Error");
            builder.setMessage(message);
            builder.setPositiveButton("continue", new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    handler.proceed();
                }
            });
            builder.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    handler.cancel();
                }
            });
            final AlertDialog dialog = builder.create();
            dialog.show();
        }

A workaround is putting handler.proceed() and handler.cancel() in if else解决方法是将 handler.proceed() 和 handler.cancel() 放入 if else

@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
    if (error.toString().equals("SSLError")) {
        handler.cancel();
    } else {
        handler.proceed();
    }
}

Good luck!祝你好运!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 android 应用程序在上传到谷歌播放时崩溃 - android app crashes when uploading to google play 在Google Play商店中上传已签名的apk时使用其他帐户 - Using other account when uploading signed apk in google play store 上传到 Play 商店时出现 Android 应用程序错误,上传前测试一切正常 - Android App Error when uploaded to Play Store , Before Uploading, tested everything was fine 将图像上传到Google App Engine上的Blob存储 - Uploading images to blob store on google app engine 将APK的草稿上传到Google Play中以测试应用内结算 - Uploading draft of APK into Google Play to test In-App Billing 在Google Play商店中更新我的应用程序时,如何保持我的应用程序通知显示? - How can I keep my app's notification displayed when my app is updated on Google Play store? 我正在尝试编写Google Map应用程序代码,但是即使安装了Google Play商店服务后,我也收到以下错误消息: - I am trying to write a google map app code, but even after installing the google play store services i am getting the following error: 在Google Play商店上发布应用程序后,如果该应用程序依赖于Google登录,该如何测试? - How do I test my app when it's dependent on Google sign in after publishing app on the Google Play Store? 使用JSoup从Google Play商店获取应用名称 - Using JSoup to get app names from Google Play Store 我在Google Play商店中的第一个应用程序向我展示了此内容 - My first app on google play store show me this
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM