Error running second Activity: The activity must be exported or contain an intent-filter
Put android:exported="true"
in the <activity>
tag
<activity android:name=".secondActivity"
android:exported="true">
Error running 'splash': The activity must be exported or contain an intent-filter
You should switch intent-filter
from MainActivity
to splash
.
Below you will find the solution:
<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=".splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"/>
</application>
Don't forget to extend AppCompatActivity
in splash
.
Also, I recommend to rename splash
to SplashActivity
Related Topics
Android and Getting a View with Id Cast as a String
I Cant See Any Firebaserecycleradapter Items on My Layout
Divide Elements on Groups in Recyclerview or Grouping Recyclerview Items ,Say by Date
Why Can't I Use Resources.Getsystem() Without a Runtime Error
How to Make Edittext Not Focused When Creating Activity
Android - Bitmap Cache Takes a Lot of Memory
Android JSON Parsing of Multiple JSONobjects Inside JSONobject
Java Client and a C++ Server Send and Receive via Tcp Socket
Call and Receive Output from Python Script in Java
Setting the Default Font of Swing Program
How to Persist Permission in Android API 19 (Kitkat)
Google Maps API and Custom Polyline Route Between Markers
Setting a Spinner Onclicklistener() in Android
Networksecurityconfig: No Network Security Config Specified -- Android 7.0 Error
Parcelable and Inheritance in Android
Gradle Sync Failed: Unable to Find Method