voyager icon indicating copy to clipboard operation
voyager copied to clipboard

Strict mode policy violation imp

Open prabinshrestha opened this issue 5 months ago • 1 comments

Screenshot 2024-01-10 at 12 23 03

I am using voyager and used the latest library it is giving following violation issue especially on android 9 and below

class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { MyApplicationTheme { Surface( modifier = Modifier.fillMaxSize(), color = MaterialTheme.colors.background ) { Navigator(SplashScreen) // GreetingView(Greeting().greet()) } } } } }

The version of my appcompat is implementation("androidx.appcompat:appcompat:1.6.1")

How could we solve this? or its not from voyager? Any solution for this?

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z at android.os.StrictMode.lambda$static$1(StrictMode.java:416) at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2) at java.lang.Class.getDeclaredMethodInternal(Native Method) at java.lang.Class.getMethod(Class.java:2067) at java.lang.Class.getDeclaredMethod(Class.java:2050) at androidx.appcompat.widget.ViewUtils.(ViewUtils.java:53) at androidx.appcompat.widget.ViewUtils.makeOptionalFitsSystemWindows(ViewUtils.java:89) at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:1056) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:889) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:781) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:209) at androidx.activity.compose.ComponentActivityKt.setContent(ComponentActivity.kt:70) at androidx.activity.compose.ComponentActivityKt.setContent$default(ComponentActivity.kt:51) at com.example.android.MainActivity.onCreate(MainActivity.kt:32) at android.app.Activity.performCreate(Activity.java:8143) at android.app.Activity.performCreate(Activity.java:8114) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:8060) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V at android.os.StrictMode.lambda$static$1(StrictMode.java:416) at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2) at java.lang.Class.getDeclaredMethodInternal(Native Method) at java.lang.Class.getPublicMethodRecursive(Class.java:2079) at java.lang.Class.getMethod(Class.java:2066) at java.lang.Class.getMethod(Class.java:1693) at androidx.appcompat.widget.ViewUtils.makeOptionalFitsSystemWindows(ViewUtils.java:93) at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:1056) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:889) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:781) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:209) at androidx.activity.compose.ComponentActivityKt.setContent(ComponentActivity.kt:70) at androidx.activity.compose.ComponentActivityKt.setContent$default(ComponentActivity.kt:51) at com.example.android.MainActivity.onCreate(MainActivity.kt:32) at android.app.Activity.performCreate(Activity.java:8143) at android.app.Activity.performCreate(Activity.java:8114) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3513) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3700) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:236) at android.app.ActivityThread.main(ActivityThread.java:8060) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

prabinshrestha avatar Jan 10 '24 06:01 prabinshrestha