Android Studio Apps Launcher missing but installed - android

I have read some other question about this problem and after trying,editing and inspecting my manifest , my Apps Launcher still doesnt appear
here is my manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.common.myappname">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".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>
<activity
android:name=".MerchantActivity"
android:label="#string/title_activity_merchant"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<activity
android:name=".SlidingTabsActivity"
android:label="#string/title_activity_voucher"
android:theme="#style/AppTheme.NoActionBar">
</activity>
</application>
</manifest>
Thanks, i appreciate any help offered.

Related

The activity must be exported or contain an intent-filter - even though there's an intent filter

IDK why it's happening, there's an intent filter in there.
I think I'm missing a tiny problem, that another point of view can detect faster/
thanks!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.caloriecalculator">
<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=".Login"></activity>
<activity android:name=".MainActivity" />
<activity
android:name=".Register"
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>
</manifest>

Remove MainActivity created by Android Studio

How can edit the manifest so the MainActivity is removed?
I've been following some tutorials to learn to create android apps and I've got stuck in the Activity subject.
When I create a project the Software gives me an deafult activity called MainActivity. I've deleted it so I could name my class as I wish.
However, even after deleting the files the activity still presents on the Manifest. I've tried to play around, deleting some words, but with no success.
This is the current manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="androidedx.example.activitylifecycle">
<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=".Activity1"></activity>
<activity android:name=".Activity2" />
<activity android:name=".MainActivity">-------<<<<<<0!!!!!!!!!!!!!
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It has this row of content that the android studio warns me about, that I'm poiting with -------<<<<<<0!!!!!!!!!!!!!.
I recall my question: How can edit the manifest so the MainActivity is removed?
Remove the MainActivity Java file and Manifest Declaration and activity1 set as a LAUNCHER Activity
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="androidedx.example.activitylifecycle">
<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=".Activity1">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activity2" />
</application>
</manifest>
You can create manifest like this if you want to use other activity
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="androidedx.example.activitylifecycle">
<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=".Activity1">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activity2" />
</application>
</manifest>
This below code make activity as Main and first launched :
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

duplicate registration for activity "androidstutio"

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.testlocalserver">
<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>
<activity android:name=".confirmActivity" />
<activity
android:name=".confirmActivity"
android:label="#string/title_activity_confrim"
android:theme="#style/AppTheme.NoActionBar"></activity>
</application>
Below is the error:
error:at android:name=".confirmActivity"
duplicate registration for activity
android.testlocalservice.confirmactivity
I don't why this is happenning and i read some answers and says select the mode !!
how can i set the mode of activity ,why ?
As the error says, you have two activities with the same name.
Remove one of them:
<activity android:name=".confirmActivity" />
<activity
android:name=".confirmActivity"
android:label="#string/title_activity_confrim"
android:theme="#style/AppTheme.NoActionBar"></activity>

I can not run my application Android Studio

Can you help me please?
When I try to run, the compiler show me this. Some idea? Thanks
This is the AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.cyrax.rocas">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
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>
<activity android:name=".Infoclase"></activity>
</application>
</manifest>
Clean your project and rebuild it.

Cannot change intent filter in android manifest

I have 3 activities in this android studio project. I'm tasked with starting them each separately by moving the intent filter into the activity, however I'm unable to start one of my activities. The same activity doesn't have a /activity> closing tag and I'm not sure why. Any help would be greatly appreciated.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.sean.lab1">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".ListItemsActivity"></activity>
</application>
</manifest>
I am able to move the intent tag to my ListItemsActivity and it will start, but I am not able to move the intent filter tag to my LoginActivity, nor does LoginActivity have a closing </activity> tag.
Here is what you want to do
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity">
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ListItemsActivity"></activity>
</application>
Try this.
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity"></activity>
<activity
android:name=".LoginActivity"
android:label="#string/title_activity_login"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ListItemsActivity"></activity>
</application>

Categories

Resources