Skip to main content
Question

App crasing after Revenuecat implemntation on Android app

  • June 28, 2026
  • 2 replies
  • 15 views

Forum|alt.badge.img

Hello,

After integrating the RevenueCat library into my Android app, the application started crashing on launch.

Below is the stack trace:

Exception java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:929)
Caused by java.lang.reflect.InvocationTargetException:
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:566)
Caused by com.revenuecat.purchases.PurchasesException:
at com.revenuecat.purchases.SimulatedStoreErrorDialogActivity.crashApp (SimulatedStoreErrorDialogActivity.kt:55)
at com.revenuecat.purchases.SimulatedStoreErrorDialogActivity.onCreate$lambda$0 (SimulatedStoreErrorDialogActivity.kt)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage (AlertController.java:186)
at android.os.Handler.dispatchMessageImpl (Handler.java:142)
at android.os.Handler.dispatchMessage (Handler.java:125)
at android.os.Looper.loopOnce (Looper.java:269)
at android.os.Looper.loop (Looper.java:367)
at android.app.ActivityThread.main (ActivityThread.java:9333)

I am not using any simulated store environment—this app is running in production, not in sandbox or test mode.

Since this issue is already affecting production users and resulting in negative reviews, I would appreciate guidance on how to resolve it as soon as possible.

Environment:

  • RevenueCat SDK: v10.8.0
  • compileSdk: 36

2 replies

Forum|alt.badge.img+4
  • Member
  • June 29, 2026

Hey there!

This usually means the app is being initialized with a RevenueCat Test Store API key.

For production builds, please make sure you are using the Android/Google Play public key from RevenueCat, not the Test Store key. The Test Store key is only meant for local/testing flows and should not be submitted to Google Play.

I’d recommend checking the RevenueCat API key used in your production build, confirming your offering is connected to real Google Play products, then rebuilding and releasing a new Android version.


guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • June 30, 2026

Hey ​@richface-34cbd7 - from the logs, it does indeed seem that the crash is due to the Test Store API key being used in Production, as ​@Crudyg123 mentioned!

Using this key in Production will fail at launch, as it’s meant to be used to validate testing only. From our docs:

To configure your SDK to use the Test Store instead of the real store, use the Test Store API Key generated above whenever you initialize the RevenueCat SDK. Before shipping to production, switch this key back to the platform-specific API keys for each platform your app supports. You can find all your keys in Project Settings > API keys.

❗️CRITICAL: Never submit apps with a Test Store API key

Never submit an app to the App Store or Google Play that is configured with a Test Store API key. Always use the correct platform-specific API key (iOS, Android, etc.) for release builds.

We recommend using build configurations or environment variables to automatically select the correct API key for each build type:

  • Development/Debug builds: Test Store API key
  • Production/Release builds: Platform-specific API key (iOS, Android, etc.)

more context here: https://www.revenuecat.com/docs/test-and-launch/sandbox/test-store#initialize-the-sdk-with-your-test-store-api-key

 

Could you with the platform specific keys, even in your testing, and see how that works for you then?