0

I am new to this forum and in general in android development. I wish to help solve a problem that I have when running the app. The app I'm developing now is based on an activity of google maps. I've done all steps as creating credentials in google api developers and copy the key to xml and manifest. When I run the app I get this error:

Error: (2, 10) Error: The fate of the processing instruction that matches" [xX] [mM] [lL] "is not allowed. App: mergeDebugResources FAILED

What I'm trying for now is just to run the app and show me the google maps

This is google_maps_api.xml:

<resources><string name="google_maps_key" translatable="false" templateMergeStrategy="preserve">AIzaSyDtbq2HdPj5VpKCCvhj1vbuUaA1HIAz8Gg</string>
<?xml version="1.0" encoding="utf-8" ?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    android:name="com.google.android.gms.maps.MapFragment"
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/></resources>
miken32
  • 42,008
  • 16
  • 111
  • 154

1 Answers1

0

I also faced the same problem in one of my android projects.

in my case, it is coming from the AndroidManifest.xml. because I added

<?xml version="1.0" encoding="utf-8"?>

in the starting of the file

this line should not be there in the file . and I resolve it by removing the line.

In your case also you have the line in the AndroidManifest.xml file. So remove it. I think it will solve your problem.

ujjal das
  • 897
  • 11
  • 15