Android应用程式在模拟器上当机,但可在装置上运作

时间:2020-10-16 14:36:53

标签: android android-emulator

我收到这些运行时错误,这些错误导致我检查我正在使用的Intent。以下PendingIntent会在模拟器上导致致命错误。模拟器是Nexus 6 API 23,Android 8.0 Oreo。在实际设备上,我也对其进行了测试,并且可以正常工作。设备为Android7。有什么想法或建议吗?可以发布该应用程序吗?

Poly3DCollection

运行时错误

 Intent notificationIntent = new Intent( getApplicationContext(), AlarmReceiver. class ) ;
       notificationIntent.putExtra(AlarmReceiver. NOTIFICATION_ID , 1 ) ;
        notificationIntent.putExtra(AlarmReceiver. NOTIFICATION , notification) ;
        notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
                | Intent.FLAG_ACTIVITY_SINGLE_TOP);
       PendingIntent pendingIntent = PendingIntent. getBroadcast ( getApplicationContext(), 10 , notificationIntent , PendingIntent. FLAG_UPDATE_CURRENT ) ;

0 个答案:

没有答案