Artem Artem - 1 month ago 14
Android Question

Error in Manifest after copy-paste code from google samples

I want to add Google Analytics to my app. I made the following changes according to instructions from google:

Code

<service android:name="com.DriverNotes.AndroidMobileClient.GcmIntentService" />
<service android:name=" com.google.android.gms.analytics.CampaignTrackingService" />


but I am getting this error in the Manifest file:

Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

I tried removing the ' ' (space) symbol in
...oid:name=" com.google.androi...
but after restart it returns.

Answer

When your IDE encounters a build error in the manifest, it is probably opening the build-generated manifest file to display the error. Any edits to this file have no effect, as it will be overwritten during the next build. Make sure you edit instead the AndroidManifest.xml file located somewhere under your /src directory.