我的代码:
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int
{
if (!this.isRunning)
{
this.isRunning = true
this.backgroundThread?.start()
}
return START_NOT_STICKY
}
错误:
指定为非空的参数为空:方法co.okex.app.global.services.backgroundservices.socketservice.onstartcommand,参数intent
android.app.ActivityThread.handleServiceArgs (ActivityThread.java:3943)
android.app.ActivityThread.access$2300 (ActivityThread.java:218)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1832)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:145)
android.app.ActivityThread.main (ActivityThread.java:6934)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1404)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1199)
1条答案
按热度按时间8qgya5xd1#
应该是