Android In-App Billing v3: “Can't perform operation: queryInventory”

后端 未结 11 2127
野趣味
野趣味 2021-01-31 09:15

I have setup In-App Billing for the first time using the new v3 API. It is working correctly on my devices but I have received a lot of error reports from other users.

O

11条回答
  •  温柔的废话
    2021-01-31 09:48

    There were many problems with IABHelper.java.

    Firstly - the version that is downloaded by the SDK Manager is not kept up to date. Use the version found here: https://code.google.com/p/marketbilling/source/detail?r=15946261ec9ae5f7c664d720f392f7787e3ee6c7 It is the most up to date version as of posting this answer. Many issues seem to have been fixed with this version compared to the initial release which comes from the SDK Manager.

    Only thing I've had to change in this version is adding flagEndAsync(); after line 404 which fixes an IllegalStateException when 2 IAB purchase flows are launched in quick succession.

    With this version you do not need to manage using flagEndAsync(); in your files and can leave the method to not be public.

提交回复
热议问题