Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/215.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在我提到清单中的服务之后,我怎么还能遇到这个问题_Java_Android_Service_Module_Android Manifest - Fatal编程技术网

Java 在我提到清单中的服务之后,我怎么还能遇到这个问题

Java 在我提到清单中的服务之后,我怎么还能遇到这个问题,java,android,service,module,android-manifest,Java,Android,Service,Module,Android Manifest,我试图从另一个模块运行一个服务,但如果我在清单中声明了这个服务,我仍然会得到一个异常 在模块app.mainifest中 <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="test.OFIE"> . . . <applica

我试图从另一个模块运行一个服务,但如果我在清单中声明了这个服务,我仍然会得到一个异常 在模块app.mainifest中

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="test.OFIE">
       .
       .
       .
<application ....>
       .
       .
       .
       .
<service android:name="zdi.pak.xmlmmi.Service_libs.PlayerService"/>

</application>

</manifest>

它被声明为服务。您可能正在使用startActivitynew意图调用此服务。类。由于没有活动声明为该类,因此出现错误

W/System.err: android.content.ActivityNotFoundException: Unable to find explicit activity class {test.OFIE/zdi.pak.xmlmmi.Service_libs.PlayerService}; have you declared this activity in your AndroidManifest.xml?