0

I'm programming an app with sqlite+JSON, but suddenly I couldn't Run it anymore, and it popped this message, here's my AndroidManifest.xml , Idk if there's something wrong with it, my main activity is called DatosActivity, I wish you could help me.

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

    <application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name="com.example.hitan.practica2_u3.DatosActivity"
        android:theme="@style/AppTheme.NoActionBar"></activity>
</application>

</manifest>
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

4 Answers4

0

You should add category.LAUNCHER & action.MAIN .

 <activity 
       android:name="com.example.hitan.practica2_u3.DatosActivity"
       android:theme="@style/AppTheme.NoActionBar"
          >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
 </activity>
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
0

Add this intent filter inside your activity tag

<activity
        android:name="com.example.hitan.practica2_u3.DatosActivity"
        android:theme="@style/AppTheme.NoActionBar">
         <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

</activity>
Navneet Krishna
  • 5,009
  • 5
  • 25
  • 44
0

This error is coming because you have not added the default screen which should execute first. So try adding following code snippet, and your problem will be solved:

<activity
        android:name="com.example.hitan.practica2_u3.DatosActivity"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

Hope it helps.

Pankaj Lilan
  • 4,245
  • 1
  • 29
  • 48
0

Please Add Intent Filter Tag in Manifest To Make It Default while Launching.

parvesh
  • 1
  • 1