我使用的是Android IAB,它在Nexus 5上完美运行但是在asus zenfone上我遇到了跟随stacktracke的错误
java.lang.IllegalArgumentException: java.security.spec.InvalidKeySpecException: java.lang.RuntimeException: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
at com.miskatmobile.android.almishbah.util.Security.generatePublicKey(Security.java:86)
at com.miskatmobile.android.almishbah.util.Security.verifyPurchase(Security.java:66)
at com.miskatmobile.android.almishbah.util.IabHelper.queryPurchases(IabHelper.java:773)
at com.miskatmobile.android.almishbah.util.IabHelper.queryInventory(IabHelper.java:532)
at com.miskatmobile.android.almishbah.util.IabHelper.queryInventory(IabHelper.java:510)
at com.miskatmobile.android.almishbah.util.IabHelper$2.run(IabHelper.java:589)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.security.spec.InvalidKeySpecException: java.lang.RuntimeException: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
at com.android.org.conscrypt.OpenSSLKey.getPublicKey(OpenSSLKey.java:101)
at com.android.org.conscrypt.OpenSSLRSAKeyFactory.engineGeneratePublic(OpenSSLRSAKeyFactory.java:47)
at java.security.KeyFactory.generatePublic(KeyFactory.java:171)
at com.miskatmobile.android.almishbah.util.Security.generatePublicKey(Security.java:81)
at com.miskatmobile.android.almishbah.util.Security.verifyPurchase(Security.java:66)
at com.miskatmobile.android.almishbah.util.IabHelper.queryPurchases(IabHelper.java:773)
at com.miskatmobile.android.almishbah.util.IabHelper.queryInventory(IabHelper.java:532)
at com.miskatmobile.android.almishbah.util.IabHelper.queryInventory(IabHelper.java:510)
at com.miskatmobile.android.almishbah.util.IabHelper$2.run(IabHelper.java:589)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.RuntimeException: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
at com.android.org.conscrypt.NativeCrypto.d2i_PUBKEY(NativeCrypto.java)
at com.android.org.conscrypt.OpenSSLKey.getPublicKey(OpenSSLKey.java:99)
at com.android.org.conscrypt.OpenSSLRSAKeyFactory.engineGeneratePublic(OpenSSLRSAKeyFactory.java:47)
at java.security.KeyFactory.generatePublic(KeyFactory.java:171)
at com.miskatmobile.android.almishbah.util.Security.generatePublicKey(Security.java:81)
at com.miskatmobile.android.almishbah.util.Security.verifyPurchase(Security.java:66)
at com.miskatmobile.android.almishbah.util.IabHelper.queryPurchases(IabHelper.java:773)
at com.miskatmobile.android.almishbah.util.IabHelper.queryInventory(IabHelper.java:532)
at com.miskatmobile.android.almishbah.util.IabHelper.queryInventory(IabHelper.java:510)
at com.miskatmobile.android.almishbah.util.IabHelper$2.run(IabHelper.java:589)
at java.lang.Thread.run(Thread.java:841)
知道为什么会这样吗?
感谢