androidandroid-studioandroid-runtime

When running my android studio app on my phone, it runs but does not save it on my phone


I have previously ran projects and they not only run but save as apps that I can open again later. Now for some reason this particular projects runs and opens but does not save as an app on my phone.

I'm sure I must be missing some simple setting but I can't find any solutions, any help would be appreciated.

Thanks

edit: I am using a Samsung s10 5g, I am coding in Kotlin, I didn't think these things were relevant because I can run my other projects which were also coded in Kotlin and those will save as normal apps on my phone.

<?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=".Pythagorean">
    </activity>
    <activity
            android:screenOrientation="portrait"
            android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN">
            </action>
        </intent-filter>
    </activity>
</application>


Solution

  • Go to Settings -> apps -> (find the application by name) -> uninstall for all users (Depends upon the device you are using)

    Then run your app again via Android Studio in your phone. Check if it helps.

    <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=".Pythagorean">
        </activity>
        <activity
                android:screenOrientation="portrait"
                android:name=".MainActivity">
            <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
        </activity>
    </application>