如何为Expo托管应用配置Billing Version 3权限?
Got it, let's sort out this Billing Version 3 permission issue for your Expo managed app. Here's a step-by-step breakdown:
Fix the app.json permission key first
It looks like you might have a typo in your app.json configuration—you used"permission"(singular) instead of"permissions"(plural). This is a common mistake that can cause the permission to not be recognized correctly. Update your app.json to include the permission under theandroidfield like this:{ "expo": { "android": { "permissions": ["com.android.vending.BILLING"] } } }This specific permission is exactly what Google refers to as Billing Version 3, so getting the key name right is critical.
Use Expo's In-App Purchases library (if applicable)
If your app implements in-app purchases, install theexpo-in-app-purchasespackage. This library is optimized to work with Google Play Billing Version 3 (and newer versions) out of the box, ensuring all underlying configurations are properly set. Install it with:npx expo install expo-in-app-purchasesAfter installation, initialize the library in your code to handle purchase flows—this will further validate that your app is aligned with Google's billing requirements.
Validate with EAS Build
For Expo managed apps, EAS Build is the recommended way to generate your app bundle. When you run a build, Expo will package the permissions from your app.json into the final APK/AAB. Once built, submit the bundle to Google Play; after processing, the Billing Version 3 requirement should be marked as satisfied. You can also cross-check the app's manifest post-build to confirm the permission is included.Check your Expo SDK version
Ensure you're using an Expo SDK version that supports Billing Version 3. Expo SDK 44 and later fully meet this requirement, so if you're on an older version, consider upgrading to avoid compatibility gaps.
内容的提问来源于stack exchange,提问作者Bilal Sabugar

