jason
jason

Reputation: 427

Android Application icon not changing on phone despite reboot, uninstall and re-install

Solved

Thanks to @Ifor's suggestion I think I have discovered what was causing it. Since I was not making any changes to the code, only to the resources eclipse must have not bothered creating a new .apk.
Deliberately breaking the code meant that I was changing the code therefore prompting eclipse to re-create the apk. I could be wrong in my hypothesis being a bit of a newbie but it's fixed now anyway so thanks everybody!

I have two home-made applications both with icon A. Recently I got sick of being confused by them so I tried to change one of them for a new icon, icon B. This is not working!
I have tried:
Re-installing the app;
Un-installing the app then re-installing it.
Un-installing the app then rebooting the phone and the computer then re-installing the app.
None of this works, I still end up with the original Icon A.
I have replaced the icons in the hdpi, ldpi and mdpi folders. I've also searched the folder containing my application for .png files, the only ones there are the three versions of Icon B (the correct one)
What's happening, is there a cache problem like with the windows phone development? I came across this while searching for an answer.
Btw I'm using Eclipse on Windows Vista Ultimate Any Ideas Anyone?

As Requested here's the Manifest

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.PianoSets" android:versionCode="1" android:versionName="1.0">
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".PianoSets" android:label="@string/app_name"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".SavedAccounts"></activity>
    </application>


</manifest> 

Upvotes: 3

Views: 9889

Answers (5)

Dell Anderson
Dell Anderson

Reputation: 143

A 'cleaner' method (pardon the pun!) that worked for me (forcing an update of replaced ic_launcher icon):

Project -> Clean

I got the idea from this tutorial:

http://www.slideshare.net/YasmineSherif91/android-application-how-to-change-the-icon-tutorial-2

EDIT: Although clean updates the icons, I get build errors unless I do a Refresh on the added resources before doing the clean. More info about the complementary function of refresh and clean:

Does refreshing in Eclipse also Clean the project?

Some cautions and limitations of clean here:

Function of Project > Clean in Eclipse

Upvotes: 9

Kenneth Evans
Kenneth Evans

Reputation: 2399

I find deleting the gen directory fixes this sort of problem easily. It gets rebuilt immediately, and the rebuild refreshes everything.

Upvotes: 2

jason
jason

Reputation: 427

Thanks to @Ifor's suggestion I think I have discovered what was causing it. Since I was not making any changes to the code, only to the resources eclipse must have not bothered creating a new .apk. Deliberately breaking the code meant that I was changing the code therefore prompting eclipse to re-create the apk. I could be wrong in my hypothesis being a bit of a newbie but it's fixed now anyway so thanks everybody!

Upvotes: 3

Matthew Peel
Matthew Peel

Reputation: 377

Make sure the file you use to replace the old ones are also in lower caps. Ie, replacing home.png with Home.png will not work in Eclipse.

Upvotes: 1

inazaruk
inazaruk

Reputation: 74780

You probably updated icon in only one folder. Make sure you've updated the icon in all "drawable" folders:

res/drawable-ldpi/icon.png
res/drawable-mdpi/icon.png
res/drawable-hdpi/icon.png

Upvotes: 0

Related Questions