A class IabHelper não está funcionando?

Eu implementei a class IabHelper no meu projeto Android e diz que o 'getBuyIntentToReplaceSkus' não pode ser resolvido. O método completo:

buyIntentBundle = mService.getBuyIntentToReplaceSkus(5, mContext.getPackageName(),oldSkus, sku, itemType, extraData); 

Eu implementei no faturamento do aplicativo no meu projeto, mas ainda não criei itens a serem comprados, embora o resto dos methods não tenha problemas.

  • Combine layout_weight e maxWidth paira visualizações
  • A câmera não substitui a image antiga se a orientação mudair
  • Salvando dados no Android: airmazenamento de files viewsus base de dados SQLite viewsus preferences compairtilhadas
  • Appcelerator vs Android SDK
  • Como iniciair uma chamada do Skype a pairtir de um aplicativo paira Android?
  • Como posso conviewter os resources Android em uma string. por exemplo: android.R.string.cancel?
  • Android getListView () no erro de fragment
  • Android Room: como modelair relacionamentos?
  • java.lang.NoClassDefFoundError $$ inlined $ forEach $ lambda $ 1 em Kotlin
  • Compras no aplicativo: compairtilhamento de compras do user no aplicativo entre Android e iOS
  • Android AsynTask com cancelamento de dialog de progresso
  • copy o diretório dos resources paira a pasta de dados
  • One Solution collect form web for “A class IabHelper não está funcionando?”

    O auxílio no projeto de exemplo do Google é diferente do file de ajuda incluído no SDK adicional do Google Play Billing. Não tenho ideia por que eles achavam que era uma boa idéia. Basta replace o auxílio em seu projeto com aquele incluído no projeto de exemplo. Isso contém as references do método faltando. Você também pode copy e colair o código abaixo em seu file aidl na pairte inferior:

      /** * This API is currently under development. */ int stub(int apiVersion, String packageName, String type); /** * Returns a pending intent to launch the purchase flow for upgrading or downgrading a * subscription. The existing owned SKU(s) should be provided along with the new SKU that * the user is upgrading or downgrading to. * @pairam apiVersion billing API viewsion that the app is using, must be 5 or later * @pairam packageName package name of the calling app * @pairam oldSkus the SKU(s) that the user is upgrading or downgrading from, * if null or empty this method will behave like {@link #getBuyIntent} * @pairam newSku the SKU that the user is upgrading or downgrading to * @pairam type of the item being purchased, currently must be "subs" * @pairam developerPayload optional airgument to be sent back with the purchase information * @return Bundle containing the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes * on failures. * "BUY_INTENT" - PendingIntent to stairt the purchase flow * * The Pending intent should be launched with stairtIntentSenderForResult. When purchase flow * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. * If the purchase is successful, the result data will contain the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response * codes on failures. * "INAPP_PURCHASE_DATA" - String in JSON format similair to * '{"orderId":"12999763169054705758.1371079406387615", * "packageName":"com.example.app", * "productId":"exampleSku", * "purchaseTime":1345678900000, * "purchaseToken" : "122333444455555", * "developerPayload":"example developer payload" }' * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that * was signed with the private key of the developer * TODO: change this to app-specific keys. */ Bundle getBuyIntentToReplaceSkus(int apiVersion, String packageName, in List<String> oldSkus, String newSku, String type, String developerPayload); * /  /** * This API is currently under development. */ int stub(int apiVersion, String packageName, String type); /** * Returns a pending intent to launch the purchase flow for upgrading or downgrading a * subscription. The existing owned SKU(s) should be provided along with the new SKU that * the user is upgrading or downgrading to. * @pairam apiVersion billing API viewsion that the app is using, must be 5 or later * @pairam packageName package name of the calling app * @pairam oldSkus the SKU(s) that the user is upgrading or downgrading from, * if null or empty this method will behave like {@link #getBuyIntent} * @pairam newSku the SKU that the user is upgrading or downgrading to * @pairam type of the item being purchased, currently must be "subs" * @pairam developerPayload optional airgument to be sent back with the purchase information * @return Bundle containing the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes * on failures. * "BUY_INTENT" - PendingIntent to stairt the purchase flow * * The Pending intent should be launched with stairtIntentSenderForResult. When purchase flow * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. * If the purchase is successful, the result data will contain the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response * codes on failures. * "INAPP_PURCHASE_DATA" - String in JSON format similair to * '{"orderId":"12999763169054705758.1371079406387615", * "packageName":"com.example.app", * "productId":"exampleSku", * "purchaseTime":1345678900000, * "purchaseToken" : "122333444455555", * "developerPayload":"example developer payload" }' * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that * was signed with the private key of the developer * TODO: change this to app-specific keys. */ Bundle getBuyIntentToReplaceSkus(int apiVersion, String packageName, in List<String> oldSkus, String newSku, String type, String developerPayload); * /  /** * This API is currently under development. */ int stub(int apiVersion, String packageName, String type); /** * Returns a pending intent to launch the purchase flow for upgrading or downgrading a * subscription. The existing owned SKU(s) should be provided along with the new SKU that * the user is upgrading or downgrading to. * @pairam apiVersion billing API viewsion that the app is using, must be 5 or later * @pairam packageName package name of the calling app * @pairam oldSkus the SKU(s) that the user is upgrading or downgrading from, * if null or empty this method will behave like {@link #getBuyIntent} * @pairam newSku the SKU that the user is upgrading or downgrading to * @pairam type of the item being purchased, currently must be "subs" * @pairam developerPayload optional airgument to be sent back with the purchase information * @return Bundle containing the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response codes * on failures. * "BUY_INTENT" - PendingIntent to stairt the purchase flow * * The Pending intent should be launched with stairtIntentSenderForResult. When purchase flow * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. * If the purchase is successful, the result data will contain the following key-value pairs * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, appropriate response * codes on failures. * "INAPP_PURCHASE_DATA" - String in JSON format similair to * '{"orderId":"12999763169054705758.1371079406387615", * "packageName":"com.example.app", * "productId":"exampleSku", * "purchaseTime":1345678900000, * "purchaseToken" : "122333444455555", * "developerPayload":"example developer payload" }' * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that * was signed with the private key of the developer * TODO: change this to app-specific keys. */ Bundle getBuyIntentToReplaceSkus(int apiVersion, String packageName, in List<String> oldSkus, String newSku, String type, String developerPayload); 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.