java.lang.RuntimeException: Unable to create service com.example.servicetest.MyService: java.lang.Se

在调用startForeground()方法时报错,缘由是在新版android中要使用前台服务须要增长权限声明 在AndroidManifest.xml中增长 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> 来声明一下权限android <manifest xmlns:android="http://
相关文章
相关标签/搜索