错误联系授权服务器 [英] Error contacting licensing server

查看:176
本文介绍了错误联系授权服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试立即发布我的3小时的应用程序,但我不能拿到驾照检查工作。

im trying to publish my app for 3 hours now, but i cant get the license check to work.

在我的onCreate方法我得到这个code:

In my onCreate method i got this code:

// Try to use more data here. ANDROID_ID is a single point of attack.
String deviceId = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
String pckName = getPackageName();

// Library calls this when it's done.
mLicenseCheckerCallback = new MyLicenseCheckerCallback();
// Construct the LicenseChecker with a policy.
mChecker = new LicenseChecker(this, new ServerManagedPolicy(this, new AESObfuscator(
    SALT, pckName, deviceId)), BASE64_PUBLIC_KEY);

mChecker.checkAccess(mLicenseCheckerCallback);

和回调看起来像这样

    private class MyLicenseCheckerCallback implements LicenseCheckerCallback {
    public void allow(int policyReason) {
        if (isFinishing()) 
            return; // Don't update UI if Activity is finishing.
        // Should allow user access.
        Main.isLicensed = true;
    }

    public void dontAllow(int policyReason) {
        if (isFinishing())
            return; // Don't update UI if Activity is finishing.
        Main.isLicensed = false;
    }

    public void applicationError(int errorCode) {
        if (isFinishing())
            return; // Don't update UI if Activity is finishing.
        Main.isLicensed = false;
    }
}

只有dontAllow方法被调用。和响应code为291。

Only the dontAllow method gets called. And the response code is 291.

在logcat中我得到错误联系授权服务器。

In logcat i get "Error contacting licensing server."


  • 应用程序是uplodaded到开发者控制台。

  • The app is uplodaded to the developer console.

公钥是正确的拷贝(不带任何空格)。

The public key is correct copied (without any spaces).

手机(三星Galaxy S2采用Android 4.0.4股份)获得网络

The phone (Samsung Galaxy S2 with Android 4.0.4 Stock) got internet

任何想法?

推荐答案

code对我来说很好。但我此刻类似的问题。你有没有...

Code looks good to me. But I have a similar problem at the moment. Did you ...


  • 重新启动网络连接

  • 重新启动您的电话

  • 清谷歌的数据Play商店(设置 - >应用程序 - >谷歌Play商店)

  • 清谷歌的数据发挥服务

  • 记录在您的设备谷歌Play商店与发布/测试帐户

让我知道,如果解决了这个问题。

Let me know, if solved the problem.

谢谢

这篇关于错误联系授权服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆