0

I made my android app but when I install it on Anroid 6 my app has default robot icon instead my original app icon. But when I install the same app on device with android 4.4.2, my app icon is ok.

Any idea please what could be wrong? (I have already tried to remove app icon from android 6 desktop and make new shortcut but installed app in app list has the same robot icon)

UPDATE, added AndroidManifest.xml:

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

    <uses-permission android:name="sk.baris.b_admin.permission.C2D_MESSAGE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_LOGS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

    <!-- SYNC -->
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />

    <application
        android:name="com.example.myapp.MainApplication"
        tools:replace="android:name"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/BASE_ACTION_BAR" >
        <activity
            android:name="com.example.myapp.menu.MenuActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="org.acra.CrashReportDialog"
            android:excludeFromRecents="true"
            android:finishOnTaskLaunch="true"
            android:launchMode="singleInstance"
            android:theme="@style/Theme.AppCompat.Base.CompactMenu.Dialog" />

        <receiver
            android:name=".InternetConnectionReciever"
            android:exported="true" >
            <intent-filter>
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
            </intent-filter>
        </receiver>

        <service
            android:name=".service.VolleyService"
            android:exported="false" />

        <provider
            android:name=".provider.Provider"
            android:authorities="com.example.myapp.provider"
            android:exported="false"
            android:syncable="true" />

        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="com.example.myapp.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths"></meta-data>
        </provider>

        <!-- SyncAdapter -->
        <service
            android:name="com.example.myapp.syncadapter.SyncService"
            android:exported="true"
            android:process=":sync" >
            <intent-filter>
                <action android:name="android.content.SyncAdapter" />
            </intent-filter>

            <meta-data
                android:name="android.content.SyncAdapter"
                android:resource="@xml/syncadapter" />
        </service>
        <service
            android:name="com.example.myapp.syncadapter.AuthenticatorService"
            android:exported="true" >
            <intent-filter>
                <action android:name="android.accounts.AccountAuthenticator" />
            </intent-filter>

            <meta-data
                android:name="android.accounts.AccountAuthenticator"
                android:resource="@xml/authenticator" />
        </service>
        <service android:name="com.example.myapp.service.handler.HandlerSync" />
    </application>

</manifest>
peter
  • 4,289
  • 12
  • 44
  • 67
  • Add the manifest, and confirm that all the images are your icon (if you forgot to change it on one density, that may be the problem) – Zoe Jul 17 '17 at 10:14
  • please, I did not create folder with xxxhdpi - can this be the issue? Because all other images in app are displayed correctly from xxhdpi folder. – peter Jul 17 '17 at 10:20
  • have the launcher icon for all the screen densities. – SripadRaj Jul 17 '17 at 10:21
  • No, not creating the folder isn't the issue. It goes to the closest resolution if not defined. If xxxhdpi isn't defined, it uses xxhdpi (the closest resolution. If only oke icon is defined, all resolutipns target that). If one if the resolutions, however, is defined as the default icon, that would be the problem – Zoe Jul 17 '17 at 12:35
  • I have updated my question with AndroidManifest.xml file. Please, do you see there any problem or should I post some other files? – peter Jul 17 '17 at 13:18
  • The manifest looks fine. Have you checked all of your ic launcher icons to ensure they are all the same? From the looks of things, the most likely scenario is that one of the launcher icons are the default icon (android icon) and not your custom one. That would explain why it only shows up on one device (that you have tested) – Zoe Jul 17 '17 at 13:26

4 Answers4

0

You need to set the activity icon

    <activity
        android:icon="@drawable/ic_launcher"
        android:name="com.example.myapp.menu.MenuActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
Nick Shvelidze
  • 1,564
  • 1
  • 14
  • 28
0

Did you place your custom icon in the drawable-xxhdpi folder too?

if no then place it ,clean and reinstall ur app

0

set icon to @mipmap/ic_launcher, not to @drawable/ic_launcher

basilkot
  • 592
  • 6
  • 15
0

Had similar issue. Solution was to Remove background from ic_launcher.xml In my case it was empty anyway but caused this error

Alex Ilyin
  • 1,294
  • 1
  • 12
  • 22