0

android stdio show me this ERROR Manifest merger failed with multiple errors

i find this one very useful


inside the merged manifest i found this errors :

  1. Error:Validation failed, exiting main manifest (this file)
  2. Attribute uses-feature#20000@glEsVersion at AndroidManifest.xml:12:19-46 is not a valid hexadecimal 32 bit value, found 20000 main manifest (this file), line 11

this is my Android Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="8" android:versionName="2.0" android:installLocation="preferExternal" package="com.apps.marpharma" platformBuildVersionCode="24" platformBuildVersionName="7">
    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="24"/>
    <permission android:name="info.androidhive.googlemapsv2.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.CALL_PHONE"/>
    <uses-feature android:glEsVersion="20000" android:required="true"/>
    <application android:theme="@android:style/Theme.Black.NoTitleBar" android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:name="com.apps.marpharma.App" android:allowBackup="true">
        <activity android:label="@string/app_name" android:name="com.apps.marpharma.Splashscreen" android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity android:theme="@style/AppBaseTheme" android:label="@string/app_name" android:name="com.apps.marpharma.Home" android:screenOrientation="portrait"/>
        <activity android:theme="@style/NoActionBarTheme" android:label="@string/app_name" android:name="com.apps.marpharma.AllPharmacies" android:screenOrientation="portrait" android:windowSoftInputMode="stateHidden"/>
        <activity android:theme="@style/NoActionBarTheme" android:label="@string/app_name" android:name="com.apps.marpharma.PharmacyMap" android:screenOrientation="portrait"/>
        <activity android:theme="@style/NoActionBarTheme" android:label="@string/app_name" android:name="com.apps.marpharma.PharmaciesMap" android:screenOrientation="portrait"/>
        <activity android:theme="@style/NoActionBarTheme" android:label="@string/app_name" android:name="com.apps.marpharma.CityChoice" android:screenOrientation="portrait"/>
        <activity android:theme="@style/NoActionBarTheme" android:label="@string/app_name" android:name="com.apps.marpharma.AddPharmacy" android:screenOrientation="portrait" android:windowSoftInputMode="stateAlwaysHidden"/>
        <activity android:theme="@style/NoActionBarTheme" android:label="@string/app_name" android:name="com.apps.marpharma.PharmacyLocation" android:screenOrientation="portrait"/>
        <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
        <meta-data android:name="com.google.android.gms.analytics.globalConfigResource" android:resource="@xml/global_tracker"/>
        <activity android:label="RecyclerViewTestActivity" android:name="android.support.v7.widget.TestActivity"/>
    </application>
</manifest>
zerocool
  • 3,256
  • 2
  • 24
  • 40
  • 1
    remove your google maps apikey from manifest, is not secure to post it, i will take a look at what i can help, but just an advice – Gastón Saillén Jun 27 '18 at 15:16

2 Answers2

2

I think your problem could be here

android:value="@integer/google_play_services_version"/>

please check the values of the Manifest here

https://developer.android.com/guide/topics/graphics/opengl#manifest

this is what you need

<uses-feature android:glEsVersion="0x00020000" android:required="true" />

So, try to change this

android:glEsVersion="20000"

to this

android:glEsVersion="0x00020000"
Gastón Saillén
  • 12,319
  • 5
  • 67
  • 77
1

You have a problem with

android:glEsVersion

It's actually written in your log

(AndroidManifest.xml:12:19-46)

According to Android documentation https://developer.android.com/guide/topics/manifest/uses-feature-element

The OpenGL ES version required by the application. The higher 16 bits represent the major number and the lower 16 bits represent the minor number. For example, to specify OpenGL ES version 2.0, you would set the value as "0x00020000", or to specify OpenGL ES 3.2, you would set the value as "0x00030002".

Taier
  • 2,109
  • 12
  • 22