Wai Yan Hein Wai Yan Hein - 5 months ago 22
Android Question

Android app is not installed on emulator or device when I run it in Android Studio

I am developing an Android app. In my app, I am testing my app running on both device and emulator. This is my third android app development. When I developed other apps, app is automatically installed with launch icon on device or on emulator. But when I run my currently developing app, it is successfully run on both emulator or device. But app is not installed with launch icon. I did not modify and settings to android studio. I am using android studio version 1.4. Now I need to check the launch icon and other related things. But I cannot check it, cause I cannot see launch icon installed. So please is the possible error. How can I make my app installed with launch icon once I run it. Please help me. How can I fix it please. Thanks.


This is my manifest file


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.blog.waiyanhein.mmfashion.mmfashion" >
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:name="com.blog.waiyanhein.mmfashion.model.Config"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:largeHeap="true"
android:theme="@style/AppTheme" >
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

<activity android:name=".InitialActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</activity>

</application>
</manifest>

Answer

The tags to make an activity, a launcher activity should be inside intent-filter tag. You missed that. The correct way should be:

<activity android:name=".InitialActivity"
        android:exported="true"
        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>
Comments