安卓系统版本 安卓14,
报错信息
设备信息:
App version: 7.0.1
App version code: 701
Android build version: V816.0.24.5.27.DEV
Android release version: 14
Android SDK version: 34
Android build ID: UKQ1.231003.002 release-keys
Device brand: Redmi
Device manufacturer: Xiaomi
Device name: apollo
Device model: M2007J3SC
Device product name: apollo
Device hardware name: qcom
ABIs: [arm64-v8a, armeabi-v7a, armeabi]
ABIs (32bit): [armeabi-v7a, armeabi]
ABIs (64bit): [arm64-v8a]
错误信息:
android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord{429cbe3 8151:org.autojs.autoxjs.v7/u0a340} targetSDK=34
java.lang.RuntimeException:Unable to create service org.autojs.autojs.external.foreground.ForegroundService: android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord{429cbe3 8151:org.autojs.autoxjs.v7/u0a340} targetSDK=34
android.app.ActivityThread.handleCreateService(ActivityThread.java:4891)
......
Caused by:
android.app.MissingForegroundServiceTypeException:Starting FGS without a type callerApp=ProcessRecord{429cbe3 8151:org.autojs.autoxjs.v7/u0a340} targetSDK=34
android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
android.os.Parcel.readParcelableInternal(Parcel.java:4870)
android.os.Parcel.readParcelable(Parcel.java:4852)
android.os.Parcel.createExceptionOrNull(Parcel.java:3052)
android.os.Parcel.createException(Parcel.java:3041)
android.os.Parcel.readException(Parcel.java:3024)
android.os.Parcel.readException(Parcel.java:2966)
android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7280)
java.lang.reflect.Method.invoke(Native Method)
leakcanary.ServiceWatcher$install$4$2.invoke(ServiceWatcher.kt:93)
java.lang.reflect.Proxy.invoke(Proxy.java:1006)
$Proxy6.setServiceForeground(Unknown Source)
android.app.Service.startForeground(Service.java:775)
org.autojs.autojs.external.foreground.ForegroundService.startForeground(ForegroundService.java:51)
org.autojs.autojs.external.foreground.ForegroundService.onCreate(ForegroundService.java:40)
android.app.ActivityThread.handleCreateService(ActivityThread.java:4878)
android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2410)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loopOnce(Looper.java:224)
android.os.Looper.loop(Looper.java:318)
android.app.ActivityThread.main(ActivityThread.java:8770)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)