Jaaayz
Jaaayz

Reputation: 1563

Android studio installing APK on phone but can't find the app

I am new to Android Studio and I am trying to deploy an APK to my mobile device in order to test the app. I build the APK successfully but when I install the apk of the app in my device I couldn't see it or cannot be open. But I can see the apps in the app manager showing that I installed it.

here is the code in my manifest file.

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="Pasig NutriCare"
    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.DEFAULT" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity android:name=".SplashActivity">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
</application>

Looking for help. Thanks in advance.

Upvotes: 1

Views: 3381

Answers (4)

test
test

Reputation: 1

    <activity
        android:name="com.xxx"
        android:screenOrientation="portrait"
        android:label="demo"
        android:exported="true" //
        android:windowSoftInputMode="adjustPan">
        <intent-filter>

            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>


        </intent-filter>
    </activity>

When you apply Android: exported="true" to an activity, it becomes a public activity that can be called by other applications or components to initiate the activity and present it to the user.

Upvotes: 0

Hossein Kurd
Hossein Kurd

Reputation: 4515

Did you checked Sort / Alphabetical / Custom ?

Also Check AndroidManifest.xml

Main Activity Should Contains :

Like :

    <activity android:name=".SplashActivity"
        android:launchMode="singleTask"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateHidden|adjustPan">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>

So change .SplashActivity to that you want And Remember to place dot . before it as i did

if you use sub Package Name place it , For Example :

your package is : com.example.myapplication

you create sub package as : activities

so in AndroidManifest.xml you have :

<activity android:name=".activities.SplashActivity"
    ...
</activity>

Upvotes: 2

Sunil P
Sunil P

Reputation: 3838

Make sure you specify the launcher activity for the app in your AndroidManifest.xml file:

<activity android:name=".YOURACTIVITY" android:label="@string/app_name">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

Upvotes: 1

DanielRM
DanielRM

Reputation: 666

Did you specify the launcher activity for the app (in the AndroidManifest.xml)? If all else fails, you can also install the app manually using ADB (android debug bridge) To install manually, Run this command from terminal/command prompt

adb install path_to_apk

Upvotes: 1

Related Questions