我正在按照本指南在我的应用中设置应用内结算但是在遵循Google制作的指南时,我会不断收到此处未处理的异常错误
Bundle skuDetails = mService.getSkuDetails(3,
getPackageName(), "inapp", querySkus);
和
int response = skuDetails.getInt("RESPONSE_CODE");
if (response == 0) {
ArrayList<String> responseList
= skuDetails.getStringArrayList("DETAILS_LIST");
for (String thisResponse : responseList) {
JSONObject object = new JSONObject(thisResponse);
String sku = object.getString("productId");
String price = object.getString("price");
if (sku.equals("premiumUpgrade")) mPremiumUpgradePrice = price;
else if (sku.equals("gas")) mGasPrice = price;
}
}
此代码。
指南是:http://developer.android.com/google/play/billing/billing_integrate.html#QueryDetails
为什么Google制作指南会导致这些问题,当然他们自己的说明不应该导致错误?