Skip to main content
Question

My Flutter app crashed when get offerings


Forum|alt.badge.img+1

My Flutter app crashed when get offerings. I use purchases_flutter: ^4.11.1

Error:

My Code;

 

3 replies

Forum|alt.badge.img+1

any help ?


cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 492 replies
  • May 9, 2023

Hey @sergen-c5d636!

Can you run `flutter doctor` and provide the output?


joshdholtz
RevenueCat Staff
Forum|alt.badge.img+5
  • RevenueCat Staff
  • 92 replies
  • May 10, 2023

@sergen-c5d636 Hey! ๐Ÿ‘‹ 

This is rather suspicious looking with the line in your stacktrace that saysโ€ฆ 

java. lang. IncompatibleClassChangeError: Found interface com.revenuecat.purchases.models.StoreProduct, but class was expected.

 

In Purchases Flutter v4, `com.revenuecat.purchases.models.StoreProduct` is a class but in Purchases Flutter v5 (which is in beta) it is an interface.

Did you happen to try out a beta version of Purchases lately? This error makes it seem like there could be an issue in some gradle/build cache where that is causing this confusion ๐Ÿค” 

The solution for you here might be to clean out some of your caches. There are always so many ways to do this and Iโ€™m not exactly sure which one of these would do it for you but you could:

  • Run `flutter clean`
  • Run `gralde clean` (or something similar)
  • Go into Android Studio > File > Invalidate Cachesโ€ฆ

Hopefully one of these should work for you and prevent this class/interface issue from happening!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings