/AndroidManifest.xml的解析器异常:属性名**&引用;与元素类型“关联”;服务“;必须后跟';=';性格
我的清单文件中有一个错误 /Cheve En Breve App/AndroidManifest.xml的解析器异常:与元素类型“service”关联的属性名称“andrcom.chevenbreve.App.libraries.ServiceNotification”必须后跟“=”字符 似乎无法修复,有什么建议吗/AndroidManifest.xml的解析器异常:属性名**&引用;与元素类型“关联”;服务“;必须后跟';=';性格,android,xml,permissions,Android,Xml,Permissions,我的清单文件中有一个错误 /Cheve En Breve App/AndroidManifest.xml的解析器异常:与元素类型“service”关联的属性名称“andrcom.chevenbreve.App.libraries.ServiceNotification”必须后跟“=”字符 似乎无法修复,有什么建议吗 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schema
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.chevenbreve.app"
android:versionCode="7"
android:versionName="2.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET"/>
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
android:name="com.chevenbreve.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.chevenbreve.app.permission.C2D_MESSAGE" />
<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- change com.pongodev.perkututapp with your own package name -->
<permission
android:name="com.chevenbreve.app.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.chevenbreve.app.permission.MAPS_RECEIVE"/>
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<!-- End of copy. -->
<application
android:allowBackup="true"
android:icon="@drawable/ic_share"
android:label="@string/app_name"
android:logo="@drawable/logo"
android:theme="@style/Theme.Apptheme" >
<!-- Admob -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<!-- You must insert your own Google Maps for Android API v2 key in here. -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyC29XS3jhhrZGOh3wdSN5iDZeRELhavI4E"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity
android:name="com.chevenbreve.app.ActivitySplash"
android:label="@string/app_name"
android:theme="@style/Theme.Apptheme.NoActionBar"
android:noHistory="true"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.chevenbreve.app.ActivityHome"
android:screenOrientation="portrait"
android:label="@string/app_name" >
<meta-data android:name="android.app.default_searchable"
android:value="com.chevenbreve.app.ActivitySearch" />
</activity>
<activity
android:name="com.chevenbreve.app.ActivitySearch"
android:screenOrientation="portrait">
<intent-filter >
<action android:name="android.intent.action.SEARCH"/>
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable"/>
</activity>
<activity
android:name="com.chevenbreve.app.ActivityPlaceAroundYou"
android:screenOrientation="portrait"
android:label="@string/page_around_you" />
<activity
android:name="com.chevenbreve.app.ActivityCategory"
android:screenOrientation="portrait"
android:label="@string/page_category" />
<activity
android:name="com.chevenbreve.app.ActivityPlaceList"
android:screenOrientation="portrait"
android:label="@string/page_place_list" />
<activity
android:name="com.chevenbreve.app.ActivityDetailPlace"
android:screenOrientation="portrait"
android:label="@string/page_detail_place" />
<activity
android:name="com.chevenbreve.app.ActivitySetting"
android:screenOrientation="portrait"
android:label="@string/page_setting" />
<activity
android:name="com.chevenbreve.app.ActivityShare"
android:label="@string/page_share" />
<activity
android:name="com.chevenbreve.app.ActivityAbout"
android:label="@string/page_about" />
<activity
android:name="com.chevenbreve.app.ActivityDirection"
android:label="@string/direction" />
<activity
android:name="com.chevenbreve.app.ActivityBrowser"
android:screenOrientation="portrait"
android:label="@string/app_name"
android:uiOptions="splitActionBarWhenNarrow" >
<meta-data android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="@string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<provider android:name="com.chevenbreve.app.libraries.SuggestionProvider" com.chevenbreve.app.libraries.SuggestionProviderrities="com.chevenbreve.app.libraries.SuggestionProvider"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<service android:name="com.chevenbreve.app.libraries.ServiceNotification" andrcom.chevenbreve.app.libraries.ServiceNotification
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.chevenbreve.app" />
</intent-filter>
</receiver>
<service android:name="com.chevenbreve.app.GCMIntentService"/>
</application>
</manifest>
您的manifest.xml包含一些明显的错误,我已经为您更正了,请使用以下代码:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.chevenbreve.app"
android:versionCode="7"
android:versionName="2.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET"/>
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
android:name="com.chevenbreve.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.chevenbreve.app.permission.C2D_MESSAGE" />
<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- change com.pongodev.perkututapp with your own package name -->
<permission
android:name="com.chevenbreve.app.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.chevenbreve.app.permission.MAPS_RECEIVE"/>
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<!-- End of copy. -->
<application
android:allowBackup="true"
android:icon="@drawable/ic_share"
android:label="@string/app_name"
android:logo="@drawable/logo"
android:theme="@style/Theme.Apptheme" >
<!-- Admob -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<!-- You must insert your own Google Maps for Android API v2 key in here. -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyC29XS3jhhrZGOh3wdSN5iDZeRELhavI4E"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity
android:name="com.chevenbreve.app.ActivitySplash"
android:label="@string/app_name"
android:theme="@style/Theme.Apptheme.NoActionBar"
android:noHistory="true"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.chevenbreve.app.ActivityHome"
android:screenOrientation="portrait"
android:label="@string/app_name" >
<meta-data android:name="android.app.default_searchable"
android:value="com.chevenbreve.app.ActivitySearch" />
</activity>
<activity
android:name="com.chevenbreve.app.ActivitySearch"
android:screenOrientation="portrait">
<intent-filter >
<action android:name="android.intent.action.SEARCH"/>
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable"/>
</activity>
<activity
android:name="com.chevenbreve.app.ActivityPlaceAroundYou"
android:screenOrientation="portrait"
android:label="@string/page_around_you" />
<activity
android:name="com.chevenbreve.app.ActivityCategory"
android:screenOrientation="portrait"
android:label="@string/page_category" />
<activity
android:name="com.chevenbreve.app.ActivityPlaceList"
android:screenOrientation="portrait"
android:label="@string/page_place_list" />
<activity
android:name="com.chevenbreve.app.ActivityDetailPlace"
android:screenOrientation="portrait"
android:label="@string/page_detail_place" />
<activity
android:name="com.chevenbreve.app.ActivitySetting"
android:screenOrientation="portrait"
android:label="@string/page_setting" />
<activity
android:name="com.chevenbreve.app.ActivityShare"
android:label="@string/page_share" />
<activity
android:name="com.chevenbreve.app.ActivityAbout"
android:label="@string/page_about" />
<activity
android:name="com.chevenbreve.app.ActivityDirection"
android:label="@string/direction" />
<activity
android:name="com.chevenbreve.app.ActivityBrowser"
android:screenOrientation="portrait"
android:label="@string/app_name"
android:uiOptions="splitActionBarWhenNarrow" >
<meta-data android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="@string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<provider android:name="com.chevenbreve.app.libraries.SuggestionProvider" android:authorities="com.chevenbreve.app.libraries.SuggestionProvider"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<service android:name="com.chevenbreve.app.libraries.ServiceNotification"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.chevenbreve.app" />
</intent-filter>
</service>
<service android:name="com.chevenbreve.app.GCMIntentService"/>
</application>
</manifest>
您在中按建议更改了代码,但现在我得到了以下错误:com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper]解析器异常/Users/thegraphicsa/Documents/workspace/Perkutut V 1.2.1/Projects/Perkutut V.1.2.1/AndroidManifest.xml:属性“name”绑定到命名空间“”已为元素“service”指定了。这是因为您的服务包含两个“name”属性。代码已更正。