bobowg / BaiseComposeLearn

android compose 基本参考用法与示例
4 stars 0 forks source link

导航失败 #2

Closed bobowg closed 2 years ago

bobowg commented 2 years ago

2022-08-21 08:25:15.305 22055-22055/com.example.downloadablefonts E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.downloadablefonts, PID: 22055 java.lang.NullPointerException at androidx.navigation.NavController.navigate(NavController.kt:1652) at androidx.navigation.NavController.navigate(NavController.kt:1984) at androidx.navigation.NavController.navigate$default(NavController.kt:1979) at com.example.baisecomposelearn.screens.ActivateScreenKt$ActivateScreen$1$1.invoke(ActivateScreen.kt:36) at com.example.baisecomposelearn.screens.ActivateScreenKt$ActivateScreen$1$1.invoke(ActivateScreen.kt:35) at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$2.invoke-k-4lQ0M(Clickable.kt:153) at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$2.invoke(Clickable.kt:142) at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1$1.invokeSuspend(TapGestureDetector.kt:222) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178) at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166) at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397) at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431) at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420) at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328) at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:563) at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.dispatchPointerEvent(SuspendingPointerInputFilter.kt:455) at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:468) at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:310) at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297) at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297) at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:297) at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:179) at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:98) at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:97) at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1280) at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1230) at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1169) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:498) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1899) at android.app.Activity.dispatchTouchEvent(Activity.java:4262) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:456) at android.view.View.dispatchPointerEvent(View.java:15263) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6548)