problem in service in manifest file

by Honest » Mon, 17 Aug 2009 18:47:29 GMT


Sponsored Links
 Hello,

I have created the one class named MyService which extends Service. it
is in com.saltriver.service package. Now  can some one tell me how i
should specified it in anroidmanfiest.xml file. The following is
content of xml file but it is giving error in <service>. so can some
one tell me what is wrong in it.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=" http://schemas.android.com/apk/res/android" ;
      package="com.saltriver.service"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".ServiceExample"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <service android:name=".service.MyService"/>

<intent-filter>


</intent-filter>

</service>
    <uses-sdk android:minSdkVersion="3" />
</manifest>


--~--~---------~--~----~------------~-------~--~----~



problem in service in manifest file

by String » Mon, 17 Aug 2009 21:33:30 GMT


 It'd be helpful if you said what error you're getting.

First off, what you've posted isn't valid XML, the service element's
getting closed twice. Take the / out of the opening tag.

Second, if you get an error of "Class .service.MyService does not
exist", try changing your opening service tag to:
<service android:name=".MyService">

String




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. alsa-lib

today i get the master code. when I  compile ALSA, and it says
external/alsa-lib/src/shmarea.c:27:21: error: sys/shm.h: No such file or
directory
what should I do now? now i copy the shm.h from the former version android.
can be ok?

--~--~---------~--~----~------------~-------~--~----~

2. Android 1.1_r1 SDK released and developer.android.com launched

Hey developers, today we released the new, 1.1_r1 SDK. This SDK
includes some minor updates that you can read more about on the blog,
http://android-developers.blogspot.com/2009/02/android-11-sdk-release-1-now-available.html
. Also, we've launched the new developer site at http://developer.android.com
which has updated documentation for the 1.1_r1 SDK.

Cheers,
Justin
Android Team @ Google
--~--~---------~--~----~------------~-------~--~----~

3. download application on google Market

4. Hey Guys =]

5. Adding text to a custom drawable

6. Bluetooth : RFCOMM connection fails while connecting to a headset which is in discoverable mode.

7. Static Variables after Application life cycle