10-11 23:44:04.220 E/AndroidRuntime(15090): java.lang.NullPointerException
10-11 23:44:04.220 E/AndroidRuntime(15090): at com.android.vending.licensing.LicenseValidator.verify(LicenseValidator.java:101)
10-11 23:44:04.220 E/AndroidRuntime(15090): at com.android.vending.licensing.LicenseChecker$ResultListener$2.run(LicenseChecker.java:213)
10-11 23:44:04.220 E/AndroidRuntime(15090): at android.os.Handler.handleCallback(Handler.java:615)
10-11 23:44:04.220 E/AndroidRuntime(15090): at android.os.Handler.dispatchMessage(Handler.java:92)
10-11 23:44:04.220 E/AndroidRuntime(15090): at android.os.Looper.loop(Looper.java:137)
10-11 23:44:04.220 E/AndroidRuntime(15090): at android.os.HandlerThread.run(HandlerThread.java:60)
public void verify(PublicKey publicKey, int responseCode, String signedData, String signature) {
String userId = null;
// Skip signature check for unsuccessful requests
ResponseData data = null;
if (responseCode == LICENSED || responseCode == NOT_LICENSED ||
responseCode == LICENSED_OLD_KEY) {
// Verify signature.
try {
Signature sig = Signature.getInstance(SIGNATURE_ALGORITHM);
sig.initVerify(publicKey);
sig.update(signedData.getBytes());
你知道如何忽略这种异常吗,这只发生在某些设备上。因此用户无法获得许可证。我发现我的 market_licensing 库还是 1.0,但是我找不到 2.0 或更高的。请帮助我。