Icon not shown in launcher

Viewed 4361

My icon is not shown in the launcher and I can't figure out where the problem could be. This is my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.giacomopancaldi.imagesender">
<!-- To auto-complete the email text field in the login form with the use
r's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
/>
<application
android:name=".AppGlobal"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="Image Sender"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
</activity>
<activity android:name=".RegisterActivity" />
<activity android:name=".loginActivity">
<intent-filter>
<action android:name="android.intent.action.LOGIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".UploadActivity" />
<activity android:name=".ViewImageActivity"></activity>
</application>
</manifest>

I've put all the sizes for my ic_launcher (hdpi, xxhdpi, etc.), but it still doesn't work.

Thanks in advance! :-)

7 Answers

In my case it was not showing because i decide to simplify by joining 2 intent-filter elements:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
</intent-filter>

With this declaration in the manifest, the app is installed but the app icon is not installed, regardless application attributes icon and roundicon are correct or not.

Action Main need to be on its own xml element like this:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
</intent-filter>

delete or replace mipmap-anydpi-v26 folder

Keep in mind that if you create Image Asset for Adaptive Icons you need to set buildToolsVersion in your app's build.gradle to at least 26.0.0

Related