Android icon is missing - java

Why after 'run' the Android application project, the smartphone home screen does not display the application logo? while the installation was successful and running.
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
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>
<!--Include the AdActivity configChanges and theme. -->
<activity android:name=".FirebaseDBReadActivity" />
<activity android:name=".FirebaseDBActivity" />
<activity android:name=".FirebaseDBCreateActivity" />
<activity android:name=".FirebaseDBReadSingleActivity"/>
</application>
-----------ic_luncher.xml---------
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="#drawable/ic_launcher_background" />
<foreground android:drawable="#drawable/ic_launcher_foreground" />
</adaptive-icon>

Can you check android:roundIcon="#mipmap/ic_launcher_round" file?
If this not your app icon change with your icon.

Related

Android Application Build Error: Manifest merger failed with multiple errors, see logs

I already build some other applications but in this time, I am facing an unfixable error. Please help me out.
In the error it show "Manifest merger failed with multiple errors, see logs". So, I'm giving my manifest.xml file.
<?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.sharpwebtechnologies.photoviewer" >
<application
android:allowBackup="true"
android:dataExtractionRules="#xml/data_extraction_rules"
android:fullBackupContent="#xml/backup_rules"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.PhotoViewer"
tools:targetApi="31" >
<activity
android:name=".SplashScreen"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="false" >
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
</application>
</manifest>

Can't Install an Android Application ERROR "Installation did not succeed"

I was Working to my project suddly while I was testing this Error Apears:
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
This Is the Android Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ymmyserver">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Ymmy">
<activity android:name=".FoodList"></activity>
<activity
android:name=".Home"
android:label="#string/title_activity_home"
android:theme="#style/Theme.Ymmy.NoActionBar"></activity>
<activity android:name=".SignIn" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
I Didn't change any thing with the manifest file

AAPT: error: unexpected element <activity> found in <manifest><application><activity>

It specifies
ERROR:C:\Users\rafaw\OneDrive\Desktop\pp_rafa\pp_rafa\remindertest\app\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:27: AAPT: error: unexpected element <activity> found in <manifest><application><activity>.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.remindertest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="31" />
<application
android:allowBackup="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:debuggable="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:testOnly="true"
android:theme="#style/Theme.ReminderTest" >
<activity
android:name="com.example.remindertest.Activity2"
android:exported="false" />
<activity
android:name="com.example.remindertest.MainActivity"
android:exported="true" >
<activity android:name="com.example.remindertest.DestinationActivity" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="com.example.remindertest.AlarmReceiver" />
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="com.example.remindertest.androidx-startup"
android:exported="false" >
<meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup" />
<meta-data
android:name="androidx.lifecycle.ProcessLifecycleInitializer"
android:value="androidx.startup" />
</provider>
</application>
</manifest>
I can launch my app/emulator though but a few features does not work. Do you guys know what's happening? Also when I open AndroidManifest it's normal but when I launch emulator it turns red, if I exit and open again it's back to normal yellow, though there is a red underline under the destination activity problem
update this manifest file with your manifest, and rebuild.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.remindertest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="31" />
<application
android:allowBackup="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:debuggable="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:testOnly="true"
android:theme="#style/Theme.ReminderTest" >
<activity
android:name="com.example.remindertest.Activity2"
android:exported="false" />
<activity android:name="com.example.remindertest.DestinationActivity" />
<activity
android:name="com.example.remindertest.MainActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="com.example.remindertest.AlarmReceiver" />
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="com.example.remindertest.androidx-startup"
android:exported="false" >
<meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup" />
<meta-data
android:name="androidx.lifecycle.ProcessLifecycleInitializer"
android:value="androidx.startup" />
</provider>
</application>
</manifest>

Add icon in Theme.AppCompat.Light

I'm using the Theme.AppCompat.Light in my android application and I would like to add an icon on the top left of the action bar. How can I do it? This is my Android Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.progettoium">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.AppCompat.Light">
<activity android:name=".ListaPrenotazioni"></activity>
<activity android:name=".ListaCorsi" />
<activity android:name=".ListaLiberi" />
<activity
android:name=".LoginSignup"
android:label="#string/title_activity_login_signup"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Signup"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
you can add it programmatically with
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_action_refresh);
in your main activity

Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED] it is lowercased

Im getting that error when i try to run my app.
here is the manifest
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data android:name="com.google.android.gms." />
<activity
android:name="com.comeze.shekz.meathroads.MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
When i change the line android:name="com.comeze.shekz.meathroads.MainActivity" to android:name=".MainActivity" i still have the same error.
What can i do to fix this error?

Categories