I have put together a simple application and when I am installing the app the icon displays but once it's installed there is no launch icon.
Here is my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.SiteTools.convertme"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="#drawable/launch_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
</application>
</manifest>
I have tried renaming the icons but it hasn't helped, I have tested on two devices and neither get the launch icon.
I use eclipse.
You need to add an Intent Filter, or else Android won't know what application to launch. Also, your application should include the name of the app. I've included a name below as someActivity, change it to your app as appropriate. This can be done by changing your application to the following:
<application
android:allowBackup="true"
android:icon="#drawable/launch_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="someActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Did you create icons for all resolutions ? . Under your res folder add the appropiate icon size for each folder.
drawable-hdpi
drawable-ldpi
drawable-mdpi
drawable-xhdpi
Your device should pick it up from there according to its resolution
Related
I am using react native version 0.58.
I replaced my app icons with default ic_launcher.png in all mipmap folders.But app icon is still default android icon.I am sure that my png sizes are right for corresponding mipmap folder.
thanks
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.cekilissepeti">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission tools:node="remove" android:name="android.permission.READ_PHONE_STATE" />
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
I had to delete 'mipmap-anydpi-v26' from app/src/main/res folder which contained two xml files, one each, for both the normal icon, and the rounded icon.
I had to rename the files to something different than ic_launcher_round and ic_launcher,
then I updated the AndroidMaifest.xml:
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/launcher_new_name"
android:roundIcon="#mipmap/launcher_new_name_round"
If you're using MIUI on your phone you need to switch your theme.
See https://stackoverflow.com/a/15529525/15609577
Check if there is icons in android/app/src/debug/res
Some auto icon-generator tools throw icons in all android flavors
If you found icons there delete them, you should have only one place for icons under the /main/res folder
I am using react-native version 0.68.2 and my app icon was showing abnormal
Solution Worked for me:
open project
cd adroid->app->src->main->res
see for folder named as 'mipmap-anydpi-v26'
Delete the folder
rebuild your project.
Enjoy!
I've edited and added features from a programme which has involved adding another class (not activity class) since then when I load the app onto my android device I cannot see an icon appear but the app appears in the Application Manager. I have no errors showing and have commented out each section of the new class to turn it back to the original app. Could anyone tell me whether the problem is most likely to be in the manifest, the main.xml or the activity class? Or if they have come across a similar problem?
Cannot publish code due to company policy.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myAppName" <!-- real package name cannot be supplied -->
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAINACTIVITY" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="com.example.MyAppName.ProviderClassName"
android:authorities="com.example.MyAppName.ProviderClassName"
/>
</application>
</manifest>
App works fine when tested from Eclipse on phone via USB/Sync, when I try and Export it to an .apk, the Manifest.xml looses track of 2 activities under the parent "MasterActvity". Then even the USB/Sync stops working because it can't locate the activities. No memory storage is used, just text displays.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.theoreferenceguide"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.theoreferenceguide.MasterActivity"
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="TipActivity"></activity> This keeps getting kicked out during .apk
<activity android:name="UccActivity"></activity> This keeps getting kicked out during .apk
</application>
</manifest>
I agree with nicopico. It looks like you are missing the . infront of the activity which tells the manifest that the activity is in the local namespace. Alternatively if TipActivity is in the same namespace as MasterActivity you can also do android:name="com.example.theoreferenceguide.TipActivity"
i have tried with these instructions available on this devoloper link
I need to load res/layout-w1024dp-h768dp/activity_main.xml on a device of resolution 1024x768 or else a default xml file, so i configured my AVD and my project explorer looks as follows
i have tried with all, but its not working on AVD of that spec..
can anybody please help me out...
here is manifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.fm_player"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="15" />
<supports-screens android:requiresSmallestWidthDp="768" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Can Android deal with two different resolutions in the folder name?
Have you tried using:
res/layout-sw768dp
which will take the shortest length of 768, from both the width and height?
When I create an Android project in Eclipse and send it to my device for debugging, the app works fine but when I try to uninstall it, I get a strange message. Below are the steps to recreate my problem:
Eclipse Version: 4.2.0 Build id: I20120608-1400
ADT Version: 2.0.3 v201208082019-427395
Run Eclipse
Click File->New->Project...
Select Android/Android Application Project
Click Next.
Enter Application Name: Test
Build SDK: Android 4.1
Minimum Required SDK: API 8 Android 2.2
Enable: Create custom launcher icon / Create project in workspace
Click Next thrice.
Click Finish.
Connect 4.1 Android device to computer via USB.
Click Run->Run from menu.
Select "Android application" on popup the "Run As" popup.
Click Ok.
MainActivity application runs on device.
Click the Back button on the Android device.
Open applications on device and find "MainActivity" app.
Long press the MainActivity icon and drag to trash.
Here's the puzzling part:
Instead of getting a standard
Do you want to uninstall this app?
I get a dialog with this text:
MainActivity is part of the following app: Test
Do you want to uninstall this app?
Why do I get this message instead of the standard one?
Why is MainActivity the name of the app when I specifically stated the name of the app is "Test"?
Additional Information:
If I go to Settings->Apps, the Application shows up as Test but is listed in my Launcher as MainActivity.
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
The solution is to remove android:label="#string/title_activity_main" in the activity element.
The AndroidManifest.xml below solves the problem on Android 4.1.1 .
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Make sure your app name app_name is not styled.
Since I was using the app name somewhere else in the app I had made it bold, like this - In my strings.xml
<string name="app_name"><b>We are sons<b></string>
When I removed
<b></b>
tags, it worked.
Just keep it :
<string name="app_name">We are sons</string>
I do not know how to solve the first issue but the second can be solved in the following way. The problem is connected with Android new project wizzard. To solve this problem you can correct your manifest file in the following way and redeploy your project:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter android:label="#string/app_name" >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Do not forget to check what is the value of app_name. Some more details you can find in this post