你如何处理与LicenseCheckerCallback.ERROR_NOT_MARKET_MANAGED错误code?如何处理、错误、ERROR_NOT_MARKET_MANAGED、License

2023-09-13 00:28:55 作者:星空下的传说

使用 com.android.vending.licensing ,你可以检查你的应用程序的许可与否。有一个回调,的ApplicationError(),告诉你,如果出了什么差错。今天,我遇到了错误 ERROR_NOT_MARKET_MANAGED ,我想不出我应该怎么处理呢!

Using com.android.vending.licensing you can check if your app is licensed or not. There is a callback, applicationError() that tells you if anything went wrong. Today I encountered error ERROR_NOT_MARKET_MANAGED and I can't figure out how I should deal with it!

下面是我所做的:

在谷歌玩,我说我的电子邮件地址作为一个测试帐户。 在谷歌玩,我救了我的应用程序(未发表)与版本code =10。 在我的机器上,我更改为版本code =11。 许可检查现在失败,错误code ERROR_NOT_MARKET_MANAGED 。 On Google Play, I added my e-mail address as a test account. On Google Play, I saved my app (unpublished) with versionCode="10". On my machine, I changed to versionCode="11". License check now fails with error code ERROR_NOT_MARKET_MANAGED.

现在的问题是,我应该处理这个错误,或者这是一种不切实际的情况?

The question is; should I handle this error or is this an unrealistic scenario?

推荐答案

ERROR_NOT_MARKET_MANAGED :这个名字实在告诉所有关于本身,应用程序不是由Android电子市场管理(现在叫谷歌播放)。更具体地讲,您的应用程序的11版本是没有上传或发布在谷歌播放。

ERROR_NOT_MARKET_MANAGED: the name really tells all about itself, application is not managed by Android Market (now called Google Play). More specifically, the version 11 of your application is not uploaded or published in Google Play.

应该怎么处理这个错误,或者这是一种不切实际的情况?

should I handle this error or is this an unrealistic scenario?

我会认为这是一个不切实际的方案。你并不需要花费很长时间做什么特别的事情在code,你上传新的应用程序版本,谷歌播放。 ERROR_NOT_MARKET_MANAGED更像是它帮助开发人员正确实施许可检查code,并按照正确的程序进行测试许可检查,在项目建设时间LVL开发警告。检查出样品拉特code的评论:

I would consider this as an unrealistic scenario. You don't need to do anything special in code as long as you upload the new app version in Google Play. ERROR_NOT_MARKET_MANAGED is more like a LVL development warning which help developer properly implement license checking code and follow the correct procedure for testing license checking at project build time. check out the comments in LVL sample code:

private class MyLicenseCheckerCallback implements LicenseCheckerCallback {

    ... ...

    public void applicationError(ApplicationErrorCode errorCode) {
        if (isFinishing()) {
            // Don't update UI if Activity is finishing.
            return;
        }
        // This is a polite way of saying the developer made a mistake
        // while setting up or calling the license checker library.
        // Please examine the error code and fix the error.
        //String result = String.format(getString(R.string.application_error), errorCode);
        //String result = "Error";
        //handleLicensingResult(result);
    }
}

LVL集成到应用程序的整点是使用谷歌播放发布应用程序,并使用谷歌播放客户端应用程序下载和安装应用程序(见的