'Couldn't identify launch Activity: Default Activity not found (I'm using Kotlin)

I can't open the app on my phone because it says it doesn't have a launch activity so I can open it.

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.frases.coquinha">

    <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.Coquinha">
        <activity
            android:name=".MainActivity"
            android:exported="false" />

        <activity
            android:name=".tela2"
            android:exported="false" />

        <meta-data
            android:name="preloaded_fonts"
            android:resource="@array/preloaded_fonts" />
    </application>

</manifest>


Solution 1:[1]

You do not have a suitable <intent-filter> for that on either of your <activity> elements.

You need this <intent-filter> in whichever of your <activity> elements represents your launcher activity:

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

And, you would need to switch to android:exported="true" for that <activity> element.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CommonsWare