Android: APK Icon is not being installed - android

I am able to deploy my application but for some reason, I am not able to get the icon to display in the pull up menu on the Home page of the OS. Does anyone know what I can do to solve this?
By the way, the application shows up in "Manage Applications" but does not show up as an icon for some reason. Through Eclipse, I am able to start the application after deployment but that's it... After that, I don't have any way to start it because there is no icon. :( Following is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.ApplicationName"
android:versionCode="1"
android:versionName="2.0">
<application android:icon="#drawable/icon"
android:debuggable="true"
android:label="#string/app_name">
<activity android:name=".EntrySplash"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="com.android.ApplicationName"></data>
</intent-filter>
</activity>
<activity android:name=".EntryScreen" android:label="#string/app_name">
</activity>
<activity android:name=".ApplicationName" android:label="#string/app_name">
</activity>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>

I had this problem as well, i think the fix that worked for me is i separated the intent tag like below
<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.BROWSABLE"></category>
<data android:scheme="com.android.ApplicationName"></data>
</intent-filter>
when i changed my manifest file like that, my icon showed up.

Try getting rid of your android.intent.category.BROWSABLE and <data android:scheme="com.android.ApplicationName"> temporarily, and see if your icon shows up.
Also, on an unrelated matter, I recommend that your uses-* elements be the first children of manifest, not the last. There have been rumors of problems with the XML parsing done by the Android Market, where it wants to see those before any elements.

Had this same issue and found out that one caveat is that this correct intent on the main activity tag:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
has to be in its own intent filter. you may have other items in the main activity's intent filters, and if so, separate the rest out in to a separate intent filter tag right below it. leave the MAIN and LAUNCHER together in its own.
Alot of the answers to this question on SO seem to miss that point.
Hope it helps!

Well it is happening as you are giving two categories name to your launching activity. You launching activity should have only one category name in its Intent filter. But if you also need the Browsable activity then your Launching Activity may have 2 Intent Filters as show below.
You just replace your EntrySplash Activity code with the below code in you Manifest.xml file.
<activity android:name=".EntrySplash"
android:label="#string/app_name">
<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.BROWSABLE"></category>
<data android:scheme="com.android.ApplicationName"></data>
</intent-filter>
</activity>
This will sure work for you...

This problem still exists in SDK v2.2. A few more suggestions in addition to the ones above if you want to publish to your phone from Eclipse. Try these if it's still not working and you don't feel like manually publishing. Remove all blank lines in the manifest. And make sure this line just has only icon and label properties in it:
<application android:icon="#drawable/icon" android:label="#string/app_name">

Apparently I found out that it works if I manually install the application using command line adb. So, in case you updated your ADT plugin and you experience problems, just install things manually...

I find that sometimes my assets don't update in the app when I add them to my projects.
There are two ways you can fix this problem:
Clean and rebuild the project.
Uninstall the app on your phone and install it from scratch using ADT.
Simple as that!

Just to add confirmation to CommonsWare's answer, I just came across this exact bug for a project targeting 2.3.3+. I had to Delete the following:
<data android:scheme="com.android.ApplicationName"></data>
Then I had to Clean the project. I think that having to use adb to install every time is a sign of something wrong with the Manifest, and will come back to bite you later (once in the Market specificially).

Related

Making a custom launcher

Followed this tutorial.
FROM TUTPLUS
Tut seems very simple and logical, the annoying part is, it just don't work(although everything seems to make sense).
when i click the home button my app wont run, neither i get any option to select among the default launcher app and my app, i can see the app among launcher app when i go to settings>home.
I did provide filters as given in tutorial.
<activity
android:name=".HomeActivity"
android:label="Bawa launcher"
android:theme="#style/apptheme"
android:launchMode="singleTask"
android:stateNotNeeded="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Though a bit late, may help others. In phone's settings, selecting the default launcher to your launcher will solve the problem. In my case, above code worked by this method.
Everything is perfect in your code. All you need to do is remove:
<category android:name="android.intent.category.LAUNCHER" />

Application icon does not appear after installing android app

I am developing an android app and when I install the app on android phone, the application icon does not appears in application section. But it appears in application manager and I can make uninstallation. After googling, some said I need to rebuild my project and to make sure the app icon in drawable resource. I already tried for this solution and the problem is still occurring. The manifest file I created is as follow:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MyActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.view" />
<data android:scheme="geo" />
</intent-filter>
</activity>
</application>
I believe geo scheme cannot be used with Launcher. I can't find any documentation but in this tutorial they suggest to use with default category.
Please try to move your location related code to another activity and move scheme=geo filter to that one.
In your manifest in activity try using or add another intent filter
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
`
Change
android:icon="#drawable/ic_launcher"
With your icon
if you wanna to remove this icon you have to remove from all folder like
drawable
drawable-hdpi
drawable-mdpi
drawable-xhdpi
I set action android:name="android.intent.action.MAIN and android:name="android.intent.category.LAUNCHER two of mine activity intent.For this I'm having two launcher icon.When I noticed that I remove one activity's intent filter,but My launcher icon disappear.I tried all the mentioned above solution but didn't work.As I noticed Darpan's comment about re-starting your phone will fix it I tried and It works for me
In my case, my manifest included a label for the main activity. I deleted the label, restarted the app and the icon magically appeared in the applications list.

In android every .java file becomes an app on the phone!

I have 6 .java files under one package.In eclipse, after I export the .apk and install the app on the phone or if i run the app on the emulator, there are 6 applications created, one for each .java file! The java files are different screens in my app.So i can open any java file by clicking on the icon in the menu.I only want one of them to be openable through the icon in the menu. So basically, only one icon should be seen in the main menu, which upon clicking opens the first activity in the manifest file!
Any idea whats wrong?
Thanks.
My assumption:
You registered all your Activities in the AndroidManifest (which is right) but as intent-filter you always used
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
That intent-filter tells Android to add the Activity to the launcher. Remove those Intent-filters (except one Activity that's going to be your main entry point) and it should work.
What does your manifest say? It might specify that all activities are shown as seperate apps...
Just check your AndroidManifest.xml file and modify your activity same as below code example:
<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>
<activity android:name=".SecondActivity"
android:label="SecondActivity">
</activity>
So if you mark the above code then you can easily come to know that the below code mention that this activity is going to be act as a launcher activity.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Try to mention the intent-filter action as MAIN and Category as Launcher only for your entry activity in your app.
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>.
Remove this for all other activities except the entry point for your app.
Hope this helps.

Android, icon been duplicate when i install my app on the device

I try to install the app that i develop on my device (Htc desire) and i see that the icon of the app is duplicate
what i need to change to don't late that happen?
how could i delete one of the icon?
Thanks for helping!!
I came up this issue today, I am using Gradle.
I found out there was a folder ./build/manifests/debug/AndroidManifest.xml was generated from gradle build, and it had duplicate intent-filter of category launcher.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
...
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
One of it was came by gradle dependencies compile project. So I went back and check dependencies project and remove it, and the problem solved.
Android's Launcher app creates an icon for each Activity in your Application that includes the intent filter android.intent.category.LAUNCHER.
Remove this intent filter from all Activities that should not be launched. In other words, define this intent filter in your main Activity, and in your main Activity only.
for change icon of app..
<application android:icon="#drawable/icon" android:label="#string/app_name">
see this line in your menifest file.. and change "#drawable/your_icon_name" instead of "#drawable/icon"
do you use the default icone of android , or u have change the app's icon from the manifest ?
if that's right , try using the default icon of android , and then see if that will duplicate the app's icon or not
try to use this ,
<intent-filter>
<action android:name="android.intent.action.(your action )" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
and you have to use ur main activity
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
let me comments if any issue.
force stop your launcher from settings - app manager and clear cash data of launcher and check your problem is resolved

Android application icon not showing up

I've just spent numerous hours constructing an icon for an Android app I'm working on, but can't get it to show up for the app in the emulator.
I've put it in res/drawable-hdpi, res/drawable-mdpi, res/drawable-ldpi in the respective sizes as defined in http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html
The manifest contains the line:
<application android:icon="#drawable/icon" android:label="#string/app_name" android:debuggable="true">
Any ideas as to why it isn't showing up?
I would like to elaborate on the answers of #Britton Pentakill and #arnav bhartiya because I could solve my problem using their answers. I added more actions on my MainActivity because Android Studio was complaining that "App not indexable by Google" and I also wanted it to be indexable.
Wrong AndroidManifest.xml:
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.SEND"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"
android:host="siara.cc"
android:pathPrefix="/CrossCalc" />
</intent-filter>
So when I published my app, people could not find my App Icon on their device, no Open button after installing on Play console, even if it did pass review and published on play store (it took 7 days).
Then when I read their answers, I corrected and now I am able to see the icon for opening my app:
Correct:
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:scheme="https"
android:host="siara.cc"
android:pathPrefix="/CrossCalc"/>
</intent-filter>
Make sure the icon is stored with the name icon.png in those folders.
Make sure android has a drawable/icon resource. Check this by looking at your gen/R.java file and seeing public static final int icon = 0x.... in the drawable inner class.
Try cleaning your project build and uninstalling any existing version of your app from your phone/emulator and then reinstall the new version.
Notice Win Myo Htet's comment on the accepted answer. He solved my problem.
Jems since your answer has so much vote, can you add the following
pointer too: Make sure that intent-filter for MAIN and LAUNCHER is not
mixed with other intent-filter. – Win Myo Htet Dec 6 '15 at 5:47
"mixed" being the keyword. I had intent in my AndroidManifest.xml file that was there to prevent all file types from being available in file selects. While it began with the second answer's solution, it contained the extra intent for the file selects. This prevented Android from installing my icons when installing the app. I wanted to post this in case anyone else ran into this issue since Win My Htet's brilliant advice could easily be missed since it is essentially one word "mixed"
Make sure that the Intent of your Launcher Activity is named MAIN i.e,
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Moreover, add the icon to your Drawable folders and then refer it in the application block of Manifest.
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
I had a similar problem recently and I eventually found out there were two causes:
File extension: To stay on the safer side, always stick to .png format. Some other formats actually work on certain devices (e.g using a .jpg icon still showed up on my Infinix note 4 phone) but .png files are guaranteed to work on all devices.
Storage location: Your icon file should be in the drawable folder. Remember to do a double check as to whether your manifest file points to the place you saved your drawable too.
I hope this helps.. Merry coding!
<manifest ...>
<application
android:icon="..."
android:roundIcon="..."/>
</manifest>
In application of manifest of your app there are two attributes, icon & roundicon. one is for debug and another is for release.
For displaying icons you need to replace the #drawable in the theme style and it will work
If you are running on Android 5.0, just add these lines into the onCreate method, inside MainActivity:
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setLogo(R.drawable.ic_launcher);
getSupportActionBar().setDisplayUseLogoEnabled(true);
It might help in your case.
Add this:
android:roundicon also
In my case after assigning both ic_launcher and ic_launcher_round in all mipmap folders I had to remove the following folder "mipmap-anydpi-v26" in order to show app Icon.
in intent filter tag only action and category are allow not others
tag. if any wrong tag in intent filter tag then you can not open and
see your application in mobile phone.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!-- <action android:name="android.intent.action.SENDTO" />-->
<!-- <data android:scheme="mailto" />-->
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

Categories

Resources