Error in Manifest after copy-paste code from googl

2019-09-05 16:21发布

问题:

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.

回答1:

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.