Error trying to generate signed APK. What can be wrong?

0

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />

<service android:name=".MyFirebaseInstanceIDService">
    <intent-filter>
        <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
    </intent-filter>
</service>


<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_app"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".Activitys.SplashScreenActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".Activitys.LoginActivity"/>
    <activity android:name=".Activitys.RegistrarActivity" />
    <activity
        android:name=".Activitys.NavegarActivity"
        android:label="@string/title_activity_navegar"
        android:theme="@style/AppTheme" >


    </activity>

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

    <fragment
        android:name=".MapsFragment"
        android:label="@string/title_activity_maps"></fragment>

</application>

ERROR

Error: (34) Error: The element must be direct child of the element [WrongManifestParent] 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       }   }   ...

    
asked by anonymous 06.06.2017 / 03:41

1 answer

1

I think the problem can be <service> out of <application>

Try this way and see if it works:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />




<application
 android:allowBackup="true"
 android:icon="@mipmap/ic_app"
 android:label="@string/app_name"
 android:roundIcon="@mipmap/ic_launcher_round"
 android:supportsRtl="true"
 android:theme="@style/AppTheme">
 <activity
android:name=".Activitys.SplashScreenActivity">
<intent-filter>
    <action android:name="android.intent.action.MAIN" />

    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activitys.LoginActivity"/>
<activity android:name=".Activitys.RegistrarActivity" />
<activity
  android:name=".Activitys.NavegarActivity"
  android:label="@string/title_activity_navegar"
  android:theme="@style/AppTheme" >


</activity>

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

<fragment
   android:name=".MapsFragment"
   android:label="@string/title_activity_maps"></fragment>

<service android:name=".MyFirebaseInstanceIDService">
  <intent-filter>
  <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
   </intent-filter>
</service>

 </application>
    
06.06.2017 / 16:51