When i try to open a paywall the apps crashes without returning any error.
With Flipper Crash Reporter i can see the error :
FATAL EXCEPTION: main
Process: com.dev12br.coupleGame, PID: 19923
java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.FrameLayout{b1c81c V.E...... ......I. 0,0-0,0}
at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer(WindowRecomposer.android.kt:352)
at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer$default(WindowRecomposer.android.kt:325)
at androidx.compose.ui.platform.WindowRecomposerFactory$Companion$LifecycleAware$1.createRecomposer(WindowRecomposer.android.kt:168)
at androidx.compose.ui.platform.WindowRecomposerPolicy.createAndInstallWindowRecomposer$ui_release(WindowRecomposer.android.kt:224)
at androidx.compose.ui.platform.WindowRecomposer_androidKt.getWindowRecomposer(WindowRecomposer.android.kt:300)
at androidx.compose.ui.platform.AbstractComposeView.resolveParentCompositionContext(ComposeView.android.kt:244)
at androidx.compose.ui.platform.AbstractComposeView.ensureCompositionCreated(ComposeView.android.kt:251)
at androidx.compose.ui.platform.AbstractComposeView.onAttachedToWindow(ComposeView.android.kt:283)
at android.view.View.dispatchAttachedToWindow(View.java:21092)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3501)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3508)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3508)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3508)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3508)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3508)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3508)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3508)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2767)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2272)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8999)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1160)
at android.view.Choreographer.doCallbacks(Choreographer.java:950)
at android.view.Choreographer.doFrame(Choreographer.java:879)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1142)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8319)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1038)
Lib versions :
{
"react-native-purchases": "^7.25.0",
"react-native-purchases-ui": "^7.25.0",
}
build.gradle :
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 24
compileSdkVersion = 34
targetSdkVersion = 34
supportLibVersion = "28.0.0"
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.15'
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.facebook.react:react-native-gradle-plugin")
}
}