gpt4 book ai didi

java - Apk 扩展文件 - 应用程序许可 - 开发者帐户 - NOT_LICENSED 响应

转载 作者:搜寻专家 更新时间:2023-10-30 20:54:31 25 4
gpt4 key购买 nike

我正在尝试使用适用于 Android 的 APK 扩展文件扩展。我已将 APK 连同扩展文件上传到服务器。如果申请之前已发布 我从服务器收到回复说 NOT_LICENSED:我使用的代码是:

APKExpansionPolicy aep = new APKExpansionPolicy(mContext,
new AESObfuscator(getSALT(), mContext.getPackageName(), deviceId));
aep.resetPolicy();
LicenseChecker checker = new LicenseChecker(mContext, aep,
getPublicKey();
checker.checkAccess(new LicenseCheckerCallback() {
@Override
public void allow(int reason) {
@Override
public void dontAllow(int reason) {
try
{
switch (reason) {
case Policy.NOT_LICENSED:
mNotification.onDownloadStateChanged(IDownloaderClient.STATE_FAILED_UNLICENSED);
break;
case Policy.RETRY:
mNotification.onDownloadStateChanged(IDownloaderClient.STATE_FAILED_FETCHING_URL);
break;
}
} finally {
setServiceRunning(false);
}
}
@Override
public void applicationError(int errorCode) {
try {
mNotification.onDownloadStateChanged(IDownloaderClient.STATE_FAILED_FETCHING_URL);
} finally {
setServiceRunning(false);
}
}
});

因此,如果应用程序之前未发布,则调用 Allow 方法。如果应用程序之前已发布但现在未发布,则调用 dontAllow 方法。

我试过:

  1. http://developer.android.com/guide/google/play/licensing/setting-up.html#test-responseHere it says that if you use a developer or test account 在您的测试设备你可以设置特定的响应,我使用 LICENSED 作为响应并仍然得到 NOT_LINCESED。
  2. 重置手机、清除 google play 商店缓存、应用程序数据。
  3. 更改不同组合的版本代码仍然无效。

编辑:如果其他人遇到这个问题,我会收到来自谷歌支持团队的邮件

We are aware that newly created accounts for testing in-app billing and Google licensing server (LVL) return errors, and are working on resolving this problem. Please stay tuned. In the meantime, you can use any accounts created prior to August 1st, 2012, for testing. So it seems to be a problem with their server, if I use the main developer thread everything works fine.

最佳答案

您是否尝试过使用您也用于发布应用程序的发布 key 对应用程序进行签名?

与应用内结算一样,只有在您使用正确的发布 key 签署您的应用时才能对其进行测试。否则 Google 无法验证请求是否来自正确的应用。

关于java - Apk 扩展文件 - 应用程序许可 - 开发者帐户 - NOT_LICENSED 响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11930142/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com