こんにちは。私は、このチュートリアルhttp://androidsourcecode.blogspot.com/2010/10/basic-android-background-service.htmlの後にバックグラウンドサービスアプリケーションを作成しました。しかし、マニフェストファイルにエラーがあります。アンドロイドでのバックグラウンドサービスの強制終了
エラーメッセージ
The element type "category" must be terminated by the matching end-tag "</category>".
私はAndroidのバックグラウンドサービスを作成する方法がわかりません。それについてのガイダンスは高く評価されます。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.javaorigin.android.sample.service" android:versionCode="1"
android:versionName="1.0">
<application icon="@drawable/icon" label="@string/app_name">
<service class=".MyService" name=".MyService">
<intent-filter>
<action android:value="com.javaorigin.android.sample.service.MY_SERVICE"
android:name=".MyService" />
</intent-filter>
</service>
<activity android:name=".SampleAction"
android:label="@string/app_name">
<intent-filter>
<action name="android.intent.action.MAIN">
<category name="android.intent.category.LAUNCHER">
</intent-filter>
</activity>
エラーメッセージは非常に明確です。あなたが最後に "/" <アクション名= "android.intent.action.MAIN" />を追加するのを忘れました –
Sujit