Hi, i have a flutter app and want to include the new paywall feature, but i get error messages, i cant make it work. (Currently i can only test for android, if thats important)
If i leave my MainActivity.kt (the main activity for android is in kotlin, not java!) at:
class MainActivity : FlutterActivity() { }
I get the error:
Unhandled Exception: PlatformException(0, Make sure your MainActivity inherits from FlutterFragmentActivity, null, null)
when i click the button that has this onTap:
onTap: () async { await RevenueCatUI.presentPaywall();},
But if i change it to:
package com.mypackage
import io.flutter.embedding.android.FlutterActivity
import com.revenuecat.purchases_flutter.FlutterFragmentActivity
class MainActivity : FlutterFragmentActivity() {
}
like the documents and community suggests, it gets Unresolved reference: FlutterFragmentActivity
and the app doesnt even start.
What should i do to solve this problem? Kotlin seems to be the standard way for Android in Flutter, and i dont think i can change it…
Thanks and best wishes, Janne