Denis Pramme
Denis Pramme

Reputation: 51

Android app icon not showing in running apps

Sometimes my app icons are not showing in the list of running apps. It only shows the standard app icon from Android.

I created an image asset from the image I would like to use as the app icon, calling it ic_launcher and setting it as android:icon in my AndroidManifest.

On the left side of the EditorArea (where the line numbers are) you get a little preview image of the used image. It still shows the standard Android icon. But when I click on the image name and open it, it shows my desired app icon, the one I want in my app!

Anywhere else it shows my desired icon perfectly (e.g. in the ActionBar), but not in the list of running apps, nor during the installation from an APK.

Here is my Manifest:

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

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

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".FullscreenActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:label="@string/app_name"
        android:theme="@style/FullscreenTheme" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".ShowEventMain"
        android:label="@string/title_activity_show_event_main" >
    </activity>
    <activity
        android:name=".ShowEventDetails"
        android:label="@string/title_activity_show_event_details" >
    </activity>
</application>

Here you can see the Image preview showing a wrong image: enter image description here

The weird thing is, that this is not happening in all of my projects. I bet if I created a new project it would work just right.

I already tried cleaning, rebuilding and making the project.

Upvotes: 2

Views: 3393

Answers (3)

Rajesh Jadav
Rajesh Jadav

Reputation: 12861

You have to add

android:logo="@drawable/ic_launcher"

or

android:icon="@drawable/ic_launcher"

under activity tag in Manifest file.

Try like this.

<activity
     android:name=".FullscreenActivity"
     android:icon="@drawable/ic_launcher"
     android:configChanges="orientation|keyboardHidden|screenSize"
     android:label="@string/app_name"
     android:theme="@style/FullscreenTheme" >
     <intent-filter>
         <action android:name="android.intent.action.MAIN" />
         <category android:name="android.intent.category.LAUNCHER" />
     </intent-filter>
</activity>

EDIT:

make sure mipmap folder contain your application launcher icon instead of default laucher icon OR try

android:icon="@drawable/ic_launcher"

instead of

android:icon="@mipmap/ic_launcher"

Upvotes: 0

Giridharan
Giridharan

Reputation: 704

Try this it may help:

Open your AndroidManifest.xml->Select Application tab at the bottom ->In Application Attributes select Icon Browse.. option ->Select Create New icon.. option ->Select Launcher Icons radio button and Next->Select Foreground: Image option and Browse.. your Image File -> choose your image and click Finish->And Select Yes to All in the dialog box,

Upvotes: 0

Naveen Tamrakar
Naveen Tamrakar

Reputation: 3339

use android:icon="@drawable/ic_launcher" in Activity Tag

<activity
        android:name=".FullscreenActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/FullscreenTheme" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

Upvotes: 2

Related Questions