Error trying to generate a signed APK

1

Error trying to generate a signed APK. I already generated the keystore, passwords, aliases, etc.

  

Error: (32) Error: The element must be a direct child of   the root element [WrongManifestParent]            element should be defined as a direct child of the    tag, not the tag or an tag.   Similarly, the tag must be declared at the root level, and   so on This check looks for incorrect declaration locations in the   manifest, and complains if an element is found in the wrong place.    link   1 errors, 0 warnings Error: Execution failed for task   ': app: lintVitalRelease'.

     
    

Lint found fatal errors while assembling a release target. To proceed, either fix the issues identified by lint, or modify your     build script as follows: ... android {         lintOptions {             checkReleaseBuilds false             // Or, if you prefer, you can continue to check for errors in release builds,             // but continue the build even when errors are found:             abortOnError false         }} ...

  

Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="projeto.projeto_app">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.READ_PROFILE" />
    <!-- Allows the API to use the Global Positioning System (GPS) to determine the device's location to within a very small area. -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <!-- Allows the API to use WiFi or mobile cell data (or both) to determine the device's location. -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <application
        android:name=".util.ApplicationUtils"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme.NoActionBar">

        <!-- Google Play Services -->
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

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

        <!--
         API Key (Coloque a sua aqui)
         https://console.developers.google.com
        -->
        <!--
             <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyC2TrJso03M7qRrBm7GnWvq_Y_0jaL5N40" />
        -->

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyCwtsvnPsAmjnjGh9qejAgzaU4R6_uvoX8"/>

        <!-- botão de login facebook -->
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />
        <!-- Main activity -->
        <activity
            android:name=".activity.MainActivity"
            android:screenOrientation="portrait" />

        <activity
            android:name=".activity.LoginActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:windowSoftInputMode="stateHidden">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <!-- Map activity -->

        <!-- Facebook activity -->
        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

        <activity
            android:name=".activity.BaseActivity"
            android:screenOrientation="portrait" />

        <!-- Keeper activity -->
        <activity
            android:name=".activity.ContatoActivity"
            android:screenOrientation="portrait" />

        <!-- Registrar activity -->
        <activity
            android:name=".activity.RegistrarActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar">
        </activity>

        <!-- Rota activity -->
        <activity
            android:name=".activity.AcomActivity"
            android:parentActivityName=".activity.MainActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".activity.MainActivity" />
        </activity>

        <!-- Map activity -->
        <activity
            android:name=".activity.MaActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar">
        </activity>

        <!-- Prevenção activity -->
        <activity
            android:name=".activity.PrevActivity"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar" >
        </activity>
    </application>

</manifest>
    
asked by anonymous 04.07.2016 / 18:15

1 answer

3

In this case, the correct thing would be to remove the <uses-feature> tag from within <application> and put it as the child of the <manifest> tag.

    
05.07.2016 / 22:30