我尝试了许可示例。它说“应用程序错误= 3”。 我在 developer.android.com 找到了许可响应代码表,但是数字 3 与上面的列表是如何对应的呢?这段代码是什么意思?
最佳答案
查看源代码 com.android.vending.licensing.LicenseValidator :
/**
* Contains data related to a licensing request and methods to verify
* and process the response.
*/
class LicenseValidator {
private static final String TAG = "LicenseValidator";
// Server response codes.
private static final int LICENSED = 0x0;
private static final int NOT_LICENSED = 0x1;
private static final int LICENSED_OLD_KEY = 0x2;
private static final int ERROR_NOT_MARKET_MANAGED = 0x3;
private static final int ERROR_SERVER_FAILURE = 0x4;
private static final int ERROR_OVER_QUOTA = 0x5;
private static final int ERROR_CONTACTING_SERVER = 0x101;
private static final int ERROR_INVALID_PACKAGE_NAME = 0x102;
private static final int ERROR_NON_MATCHING_UID = 0x103;
... ...
“应用程序错误=3”表示ERROR_NOT_MARKET_MANAGED,查看答案here看看如何处理。
关于Android 许可示例返回代码 3。这是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11861834/