У меня есть два устройства с разными версиями ОС Android 8.1 и 9. Я предоставил все разрешения для приложений на обоих устройствах. Но поведение отличается.
Это вывод, связанный с нерабочим случаем. Отчет не отправляется.
E / ACRA: ACRA обнаружил ArithmeticException для com.example.root.photolist2 java.lang.ArithmeticException: разделить на ноль в com.example.root.photolist2. MainActivity.onOptionsItemSelected (MainActivity.java:903) в android.app.Activity.onMenuItemSelected (Activity.java:3608) в androidx.fragment.app.FragmentActivity.onMenuItemSelected (FragmentActivity.java:436) в androidx.appat.appat.compat.compat.compat«Менюна androidx.appcompat.view.menu.MenuPopup.onItemClick (MenuPopup.java:128) в android.widget.AdapterView.performItemClick (AdapterView.java:318) в android.widget.AbsListView.performItemClick (AbsListView.java:1192) в android.widget.AbsListView $ PerformClick.run (: 3184) в android.widget.AbsListView.onTouchUp (AbsListView.java:4182) в android.widget.AbsListView.onTouchEvent (AbsListView.java:3896) в androidx.appcompat.widget.DropDownListView.onTouchEvent (DropownDj): DropDownв androidx. android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2705) в android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3032) в android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2719) в android.view. .dispatchTransformedTouchEvent (ViewGroup.java:3032) в android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2719) в android.widget.PopupWindow $ PopupDecorView.dispatchTouchEvent (PopupWindow.java:2407) в android.view.View.dispatchPointerEvent (View.java:12772) в android.view.ViewInPortEmpOI(ViewRootImpl.java:5230) в android.view.ViewRootImpl $ ViewPostImeInputStage.onProcess (ViewRootImpl.java:5030) в android.view.ViewRootImpl $ InputStage.deliver (ViewRootImpl.java:45mp.java.ot...R.S.RoS.R. onDeliverToNext (ViewRootImpl.java:4598) в android.view.ViewRootImpl $ InputStage.forward (ViewRootImpl.java:4564) в android.view.ViewRootImpl $ AsyncInputStage.forward (ViewRootImpl.jt. .apply (ViewRootImpl.java:4572) в android.view.ViewRootImpl $ AsyncInputStage.apply (ViewRootImpl.java:4761) в android.view.ViewRootImpl $ InputStage.deliver (ViewRootImpl.java:4545 $ $) в androidInputStage.onDeliverToNext (ViewRootImpl.java:4598) в android.view.ViewRootImpl $ InputStage.forward (ViewRootImpl.java:4564) на android.view.ViewRootImpl $ InputStage.apply (ViewRootImpl.java:4572) на android.view.ViewRootImpl $ InputStage.deliver (ViewRootImpl.java:4545) на android.viewot.IvID(ViewRootImpl.java:7263) в android.view.ViewRootImpl.doProcessInputEvents (ViewRootImpl.java:7232)в android.view.ViewRootImpl.enqueueInputEvent (ViewRootImpl.java:7193) в android.view.ViewRootImpl $ WindowInputEventReceiver.onInputEvent (ViewRootImpl.java:7369) в android.view.InputEventReatch.Event.Event.EvEce.disd.7os.MessageQueue.nativePollOnce (собственный метод) в android.os.MessageQueue.next (MessageQueue.java:326) в android.os.Looper.loop (Looper.java:165) в android.app.ActivityThread.main (ActivityThread. Java: 6823) на java.lang.reflect.Method.invoke (собственный метод) на com.android.internal.os.RuntimeInit $ MethodAndArgsCaller.run (RuntimeInit.java:547) на com.android.internal.os.ZygoteInit. main (ZygoteInit.java:873) I / Toast: Показать тост из OpPackageName: com.example.root.photolist2, PackageName: com.example.root.photolist2 W / MessageQueue: Обработчик (android.hardware.display.DisplayManagerGlobal $ DisplayLateer){37967e2} отправка сообщения обработчику в мертвой ветке java.lang.IllegalStateException: Handler (android.hardware.display.DisplayManagerGlobal $ DisplayListenerDelegate) {37967e2} отправка сообщения обработчику в мертвом потоке на android.os.MessageQueue.enqueueMessage (MessageQueue.java:549) на android.os.Handler.enqueueMessage (Handler.java:745) на android.os.Handler.sendMessageAtTime (Handler.java:697) на android.os.Handler.sendMessageDelayed (Handler.java:667) на android.os.Handler.sendMessage (Handler.java:604) на android.hardware.display.DisplayManloDisplayListenerDelegate.sendDisplayEvent (DisplayManagerGlobal.java:619) в android.hardware.display.DisplayManagerGlobal.handleDisplayEvent (DisplayManagerGlobal.java:278) в android.hardware.display.DisplayManagerGlobal.jj.jpgdisplay.DisplayManagerGlobal $ DisplayManagerCallback.onDisplayEvent (DisplayManagerGlobal.java:605) в android.hardware.display.IDisplayManagerCallback $ Stub.onTransact (IDisplayManagerCallback.java:54) в android.os.Binder.execrans для android.os.Binder.execransПроцесс: отправка сигнала. PID: 13634 SIG: 9 Процесс 13634 завершен.
Отчет отправлен в обычном режиме (Android 8.1).
E/ACRA: ACRA caught a ArithmeticException for com.example.root.photolist2
java.lang.ArithmeticException: divide by zero
at com.example.root.photolist2.MainActivity.onOptionsItemSelected(MainActivity.java:903)
at android.app.Activity.onMenuItemSelected(Activity.java:3464)
at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:436)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:196)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.app.AppCompatDelegateImpl.onMenuItemSelected(AppCompatDelegateImpl.java:888)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
at androidx.appcompat.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
at android.widget.AdapterView.performItemClick(AdapterView.java:318)
at android.widget.AbsListView.performItemClick(AbsListView.java:1158)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3127)
at android.widget.AbsListView.onTouchUp(AbsListView.java:4054)
at android.widget.AbsListView.onTouchEvent(AbsListView.java:3813)
at androidx.appcompat.widget.DropDownListView.onTouchEvent(DropDownListView.java:217)
at androidx.appcompat.widget.MenuPopupWindow$MenuDropDownListView.onTouchEvent(MenuPopupWindow.java:129)
at android.view.View.dispatchTouchEvent(View.java:11808)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3016)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2666)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3022)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2680)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3022)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2680)
at android.widget.PopupWindow$PopupDecorView.dispatchTouchEvent(PopupWindow.java:2406)
at android.view.View.dispatchPointerEvent(View.java:12052)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5066)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4876)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4408)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4461)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4427)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4554)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4435)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4611)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4408)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4461)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4427)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4435)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4408)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7002)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6976)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6933)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7120)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:186)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
D/WindowClient: Add to mViews: android.widget.LinearLayout{c201542 V.E...... ......I. 0,0-0,0}, this = android.view.WindowManagerGlobal@9729d3
D/ViewRootImpl[Toast]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
D/Surface: Surface::allocateBuffers(this=0x7bf8bbd000)
D/Surface: Surface::connect(this=0x7bf8bbd000,api=1)
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
I/Process: Sending signal. PID: 24846 SIG: 9
Process 24846 terminated.
Есть идеи?
Мой класс приложенияниже:
@AcraCore(reportFormat = StringFormat.JSON)
@AcraHttpSender(
uri = "http://XXXXXXX.ca:6127/acrarium/report",
basicAuthLogin = "abcdef",
basicAuthPassword = "123456",
httpMethod = HttpSender.Method.POST)
public class App extends Application {
@Override
public void onCreate() {
super.onCreate();
//Parse SDK stuff goes here
}
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
//ACRA.init(this);
CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this);
builder.setBuildConfigClass(BuildConfig.class).setReportFormat(StringFormat.JSON);
builder.getPluginConfigurationBuilder(ToastConfigurationBuilder.class).setEnabled(true);
builder.getPluginConfigurationBuilder(ToastConfigurationBuilder.class).setResText(R.string.acra_toast_text);
ACRA.init(this, builder);
}
}