App runs on emulator but no icon appears

Asked

Viewed 2,790 times

1

I’m creating an app for Android using Android Studio. The application works normally when running on the android emulator, however, neither in the emulator nor when I run an apk and install on mobile the icon does not appear, for example, if I close the application in the emulator and want to run again have run the "Run" in Android Studio to launch the application, and when installed on mobile installs normally but after installing does not enable the open option and does not appear the icon in the menu.

Does anyone know what it could be?

Below the AndroidManifest.xml

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_tucano"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>

        <activity
            android:name=".splash"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FullscreenTheme" >

        </activity>

        <activity
            android:name=".splashapp"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@style/FullscreenTheme" >
        </activity>
    </application>

</manifest>

1 answer

1


So that your application has its icon in the application area you must have, on Androidmanifest.xml, an Activity declared with a intent-filter which, in addition to a action "android.intent.action.MAIN", has the Category "android.intent.category.LAUNCHER".

Change the part of the Mainactivity statement to:

<activity
    android:name=".MainActivity"
    android:label="@string/app_name" >
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

Browser other questions tagged

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