Java – manifest merge failed – access to Google Maps V2
•
Java
Hello, I'm building an application through the stackskills lollipop tutorial in Android studio I'm fully following the tutorial and received this error. I can't figure out what's wrong here. Please look at my list. I thank you for your help!
This is wrong
Error:(24,13) Execution Failed for task ':app:processDebugManifest'.
> Manifest merger Failed : Attribute Meta-data#com.google.android.gms.version@value value=(730) from AndroidManifest.xml:24:13
is also present at com.google.android.gms:play-services-base:7.3.0:23:13 value=(@integer/google_play_services_version)
Suggestion: add 'tools:replace="android:value"' to <Meta-data> element at AndroidManifest.xml:23:9 to override
This is my performance
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.hailey.parse" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".SplashActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
</activity>
<Meta-data android:name="com.google.android.gms.version"
android:value="730"/>
<Meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="I am ommiting the key here but it is in the code correctly"/>
</application>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2,but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
</manifest>
Solution
According to this Google + post, Google play service version 7.0 and later will automatically include the < meta data Android: name = "com. Google. Android. GMS. Version" line for you - you can keep it all outside the manifest
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
