The core problem is that Google caches your SKU details, and there are multiple layers of cache.
The local Google Play Store app on your phone caches SKU details, and Google's server-side caches them, too. ("There are only two hard things in Computer Science: cache invalidation and naming things.")
Eventually, if you wait long enough, the caches will expire and Google will start showing the right information. But who has time for that?
Since there's a time element involved, it it's hard to know what helps and what doesn't, but here's what worked for me.
Set up a version of your APK on the Internal Test track. (The first time you do this, you'll have to wait for your app to finish "Pending Publication." The waiting itself may solve the problem.)
Set up at least one tester, get the opt-in link (this requires waiting for your app to finish "Pending Publication"), and opt-in.
Force stop and delete the cache of the Google Play Store app, using the "Apps" section of the Settings app. Click on "Storage" to access the "Clear Cache" button.
Download a version of the app via the Internal Test track. Use android.util.Log
to log your SKU details, and use Logcat to verify that your SKU details are showing correctly.
… but don't worry, you won't have to do this every time you want to test. Once the Google Play Store cache is up to date, you should be able to access your SKUs in debug builds using Android Studio.
If it doesn't work in your Internal Test build
- Uninstall the app, force stop the Google Play Store app, clear its cache, and download the Internal Test build again.
- Still not working? Something's wrong in your Google Play Developer Console. Perhaps your product is not yet active? Perhaps you misspelled the SKU in your SKU list?
If it works in your Internal Test build but doesn't work in a debug build on the same device
In this case, the Google Play Store cache is correct, but there's something different about your debug build vs. the Internal Test version you created.
- Verify that your debug build is using the same package name as the Internal Test build.
applicationIdSuffix
is a common culprit here.
- Verify that your debug build version code matches the APK version code you uploaded to Internal Test.
- Try manually installing your Internal Test APK without using the Google Play Store. If that works, you have two APKs, one of which works, and one of which doesn't. Inspect them for differences. (APKs are zip files; you can poke around in there.)