Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.0k views
in Technique[技术] by (71.8m points)

android - Firebase: The item you requested is not available for purchase

So I know this question has been asked quite a few times, however they are all based on a beta deploy from Google Play Console. In my case I have done a beta deploy through Firebase. I'm not able to find anything in regards to Firebase but tonnes on Google Play Console.

From what I've seen:

  1. GooglePlay: The item you requested is not available for purchase
  2. Android InApp Billing: The item you requested is not available for purchase. Inconsistent on a different google accounts
  3. Item you requested is not available for purchase - android in app billing

Is it right that you have to have your app deployed through the Google Play Console in order to make in app purchases? I'm just trying to do a beta test for in app purchases but I get:

Error: The item you requested is not available for purchase

If it can be done on Firebase, what do I need to do?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Thought I should mention that it was my mistake. I tried to deploy a test release with fastlane and in my Fastfile for the beta lane I did not add the properties for apk signing. If you are using fastlane to distribute a beta test make sure to have something similar to below in your Fastfile for the lane that you are calling otherwise in app billing won't work:

lane :beta do
  # ...
  gradle(
    task: 'assemble',
    build_type: 'Release'
    properties: {
        "android.injected.signing.store.file" => "[key_keystore]",
        "android.injected.signing.store.password" => "[store_password]",
        "android.injected.signing.key.alias" => "[key_alias]",
        "android.injected.signing.key.password" => "[key_password]",
      }
  )

  firebase_app_distribution(
    app: "your_app_id",
    groups: "your_test_group"
  )
  # ...
end

Note you can find the credential properties in your project's bundle.gradle file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...