2017-08-10 50 views
2

隨着Android 0(DP4在我的情況)和3.5.8版本的SDK,我在設備的每次啓動時崩潰。Onesignal在啓動Android O

碰撞如下:

引起:

java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.frandroid.app/com.onesignal.NotificationRestoreService (has extras) }: app is in background uid UidRecord{c74919a u0a125 RCVR idle procs:1 seq(0,0,0)} 
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1505) 
at android.app.ContextImpl.startService(ContextImpl.java:1461) 
at android.content.ContextWrapper.startService(ContextWrapper.java:644) 
at android.content.ContextWrapper.startService(ContextWrapper.java:644) 
at android.support.v4.content.WakefulBroadcastReceiver.startWakefulService(WakefulBroadcastReceiver.java:100) 
at com.onesignal.BootUpReceiver.onReceive(BootUpReceiver.java:42) 
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3252) 
at android.app.ActivityThread.-wrap17(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677) 
at android.os.Handler.dispatchMessage(Handler.java:105) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6541) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 

此碰撞涉及的Android O/8.0。

回答

2

這已被要求在One signal issues

@ jkasten2答案:

// Add snapshots repo if you don't have it already 
    repositories { 
     maven { url "https://oss.sonatype.org/content/repositories/snapshots" } 
    } 


compile 'com.onesignal:OneSignal:4.0.0-SNAPSHOT' 

他還提到:

從反饋其他人和我們自己測試的測試版一直保持穩定。我們正在完成我們的最終測試,我們正在下週的某個時候拍攝一個發佈。

儘管核心問題由@Swati解決。

更新:

票已被OneSignal隊關閉,以下是修復(如one signal documentation更新):

dependencies { 
    compile 'com.onesignal:OneSignal:[3.6.0, 3.99.99]' 
}