我们正面临一个奇怪的问题。另一个应用程序崩溃并向我们的应用程序抛出异常,它被 firebase 捕获。我们不知道如何保护我们的应用程序免受此影响。有人对此有任何想法吗?上面是堆栈跟踪:
Fatal Exception: java.lang.IllegalArgumentException: removeChild: container=Task=2 is not a child of container=Stack=0 current parent={stackId=2 tasks=[{taskId=2 appTokens=[AppWindowToken{c4159f token=Token{b94233e ActivityRecord{61177f9 u0 **br.com.hbsis.gda/.view.activity.HomeActivity** t2}}}] mdr=false}]}
at android.os.Parcel.createException(Parcel.java:1970)
at android.os.Parcel.readException(Parcel.java:1934)
at android.os.Parcel.readException(Parcel.java:1884)
at android.app.IActivityManager$Stub$Proxy.finishActivity(IActivityManager.java:3644)
at android.app.Activity.finish(Activity.java:5739)
at android.app.Activity.finish(Activity.java:5763)
at android.app.Activity.finishAfterTransition(Activity.java:5818)
at android.app.Activity.onBackPressed(Activity.java:3205)
at androidx.activity.ComponentActivity.access$001(ComponentActivity.java:50)
at androidx.activity.ComponentActivity$1.run(ComponentActivity.java:72)
at androidx.activity.OnBackPressedDispatcher.onBackPressed(OnBackPressedDispatcher.java:194)
at androidx.activity.ComponentActivity.onBackPressed(ComponentActivity.java:286)
at br.com.our.app.commons.ui.MainActivity.onBackPressed(MainActivity.java:243)
at android.app.Activity.onKeyUp(Activity.java:3176)
at android.view.KeyEvent.dispatch(KeyEvent.java:3389)
at android.app.Activity.dispatchKeyEvent(Activity.java:3466)
at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.java:122)
at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:84)
at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:140)
at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:569)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3031)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:602)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:6160)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6015)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5468)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5521)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5487)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5646)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5495)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5703)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5468)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5521)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5487)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5495)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5468)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5521)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5487)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5679)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:5848)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3395)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2842)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2833)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3372)
at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:326)
at android.os.Looper.loop(Looper.java:183)
at android.app.ActivityThread.main(ActivityThread.java:7258)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by android.os.RemoteException: Remote stack trace:
at com.android.server.wm.WindowContainer.positionChildAt(WindowContainer.java:425)
at com.android.server.wm.TaskStack.positionChildAt(TaskStack.java:837)
at com.android.server.wm.TaskStack.positionChildAt(TaskStack.java:825)
at com.android.server.wm.StackWindowController.positionChildAtTop(StackWindowController.java:146)
at com.android.server.am.ActivityStack.insertTaskAtTop(ActivityStack.java:3441)
似乎另一个应用程序崩溃了,我们的应用程序出现错误,我不知道发生了什么。在 Playstore 上下载该应用程序的链接如下:https ://play.google.com/store/apps/details?id=br.com.hbsis.gda&hl=pt_BR
这另一个应用程序可能是一个启动器,并且可能可以控制设备。
我们有一个可以与另一个应用程序重叠的浮动按钮。我们为此使用这个库:https ://github.com/recruit-lifestyle/FloatingView/tree/master/library/src/main/java/jp/co/recruit_lifestyle/android/floatingview 崩溃正在发生。