Error while trying to generate signed APK. What may be wrong?

Asked

Viewed 94 times

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 a 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 // 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 } } ...

  • You could insert your project’s Gradle.Bundle into your question?

1 answer

1

I believe the problem may be <service> out of <application>

Try it this way and see if it resolves:

<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>
  • I tried this way, but the firebase command is in red.. follow image http://oi67.tinypic.com/20iw4lj.jpg

  • He is not finding his class. The walk is correct?

  • I can not say if I did the right way.. I am new in Android, without much affinity. Some tip to check?

  • Write the class name and give crtl + enter to select auto complete

Browser other questions tagged

You are not signed in. Login or sign up in order to post.