我在清单文件中收到错误。
/ Cheve En Breve App / AndroidManifest.xml的解析器例外:属性名称" andrcom.chevenbreve.app.libraries.ServiceNotification"与元素类型相关联"服务"必须遵循' ='字符。
似乎无法解决问题,有什么建议吗?
<?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>
答案 0 :(得分:0)
您的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>