java - Error while Running Activity must be exorted or contain an intent-filter -


i getting error while running mainactivity or app.

enter image description here

main androidmanifest.xml file:

<?xml version="1.0" encoding="utf-8"?> 

<application     android:allowbackup="true"     android:icon="@mipmap/ic_launcher"     android:label="@string/app_name"     android:supportsrtl="true"     android:theme="@style/apptheme">     <activity android:name=".mainactivity" />     <intent-filter >         <action android:name="android.intent.action.main" />          <category android:name="android.intent.category.launcher" />     </intent-filter>     <service         android:name=".delayedmessageservice"         android:exported="false" >      </service> </application>  </manifest> 

my android version: 2.2.2 tried invalidate cache & restart, didn't help. did follow few other tutorials didn't either. p.s: trying execute intentservice mainactivity.

you closed activity tag without including intent filter in it. instead of <activity android:name=".mainactivity" /> try this

<activity android:name=".mainactivity">     <intent-filter >         <action android:name="android.intent.action.main" />          <category android:name="android.intent.category.launcher" />     </intent-filter> </activity> 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -