当我尝试在Android Kitkat 4.4.4中启动时应用程序崩溃,但在Android 5和6版本中运行良好



我是android的新手,我无法理解这里发生了什么,应用程序正常工作 Android 5&6 ,但在Android 4中崩溃( KITKAT

03-13 13:11:44.925 10802-10840/? E/GoogleConversionPing: Error sending ping 03-13 13:11:45.145 3289-3497/? E/NetworkScheduler.SR: Invalid parameter app 03-13 13:11:45.145 3289-3497/? E/NetworkScheduler.SR: Invalid package name : Perhaps you didn't include a PendingIntent in the extras? 03-13 13:11:45.228 10802-10802/? E/WifiManager: mWifiServiceMessenger == null 03-13 13:11:46.710 650-650/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History> 03-13 13:11:46.741 650-650/? E/NotificationService: unable to notify listener (posted): android.service.notification.INotificationListener$Stub$Proxy@4249a880
                                                    android.os.DeadObjectException
                                                        at android.os.BinderProxy.transact(Native Method)
                                                        at android.service.notification.INotificationListener$Stub$Proxy.onNotificationPosted(INotificationListener.java:102)
                                                        at com.android.server.NotificationManagerService$NotificationListenerInfo.notifyPostedIfUserMatch(NotificationManagerService.java:264)
                                                        at com.android.server.NotificationManagerService$2.run(NotificationManagerService.java:837)
                                                        at android.os.Handler.handleCallback(Handler.java:808)
                                                        at android.os.Handler.dispatchMessage(Handler.java:103)
                                                        at android.os.Looper.loop(Looper.java:193)
                                                        at com.android.server.ServerThread.initAndLoop(SystemServer.java:1447)
                                                        at com.android.server.SystemServer.main(SystemServer.java:1542)
                                                        at java.lang.reflect.Method.invokeNative(Native Method)
                                                        at java.lang.reflect.Method.invoke(Method.java:515)
                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
                                                        at dalvik.system.NativeStart.main(Native Method) 03-13 13:11:53.368 650-1010/? E/CellLocation: create GsmCellLocation 03-13 13:11:53.398 650-650/? E/CellLocation: create GsmCellLocation 03-13 13:11:53.608 650-825/? E/CellLocation: create GsmCellLocation 03-13 13:11:53.636 650-650/? E/CellLocation: create GsmCellLocation 03-13 13:12:01.735 650-650/? E/RemoteViews: ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search <ANR Exception MSG   History> 03-13 13:12:01.743 650-650/? E/NotificationService: unable to notify listener (posted): android.service.notification.INotificationListener$Stub$Proxy@4249a880
                                                    android.os.DeadObjectException
                                                        at android.os.BinderProxy.transact(Native Method)
                                                        at android.service.notification.INotificationListener$Stub$Proxy.onNotificationPosted(INotificationListener.java:102)
                                                        at com.android.server.NotificationManagerService$NotificationListenerInfo.notifyPostedIfUserMatch(NotificationManagerService.java:264)
                                                        at com.android.server.NotificationManagerService$2.run(NotificationManagerService.java:837)
                                                        at android.os.Handler.handleCallback(Handler.java:808)
                                                        at android.os.Handler.dispatchMessage(Handler.java:103)
                                                        at android.os.Looper.loop(Looper.java:193)
                                                        at com.android.server.ServerThread.initAndLoop(SystemServer.java:1447)
                                                        at com.android.server.SystemServer.main(SystemServer.java:1542)
                                                        at java.lang.reflect.Method.invokeNative(Native Method)
                                                        at java.lang.reflect.Method.invoke(Method.java:515)
                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
                                                        at dalvik.system.NativeStart.main(Native Method)
**If your minSdkVersion is set to 21 or higher, all you need to do is set multiDexEnabled to true in your module-level build.gradle file, as shown here:**
android {
defaultConfig {
    ...
    minSdkVersion 21 
    targetSdkVersion 25
    multiDexEnabled true
}``
...

}

依赖项{compile'com.android.support:multidex:1.0.1'}

 public class MyApplication extends MultiDexApplication { ... }

应用程序扩展了一些hotherapplication { @override受保护 void attachbasecontext(上下文基础){ super.attachbasecontext(base); 多端。install(this);}}

JobScheduler并未备份,但是,有firebase jobdispatcher支持相同的API,并通过Google Play Services进行了支持。

firebase jobdispatcher是一个用于安排背景作业的库 在您的Android应用中。它提供了一个与Jobscheduler兼容的API 在所有最新版本的Android(API 9级以上)上都有工作 安装了Google Play服务。

edit:op由于答案而突变了这个问题,所以这个答案确实没有更长的申请。

android.app.job.JobScheduler类在API级别21(Android 5.0)中添加。因此,很明显,该应用将在较早的Android版本上崩溃。

相关内容

最新更新