How To Fix Unable To Find Explicit Activity Class
public class MultiColumnActivity extends Activity implements OnClickListener { private ArrayList> list; Button filterButton; Context
Solution 1:
You need to declare like...
<activityandroid:name="com.nous.demoexample.Dateactvity"></activity>
And use intent like...
Intent intent = newIntent(MultiColumnActivity.this,Dateactvity.class);
startActivity(intent);
Solution 2:
If your activity outside main package then declare like this :
<applicationandroid:name="com.nous.demoexample.Dateactvity"></application>
Instead of
Intentintent=newIntent();
intent.setClassName("com.nous.demoexample", "com.nous.demoexample.Dateactvity");
Write like this :
Intent oIntent = newIntent(getApplicationContext(), com.nous.demoexample.Dateactvity.class);
Solution 3:
declare activity in manifest-
<applicationandroid:allowBackup="true"android:icon="@drawable/ic_launcher"android:label="@string/app_name"android:theme="@style/AppTheme" ><activityandroid:name="com.example.packageName.MultiColumnActivity
android:label="@string/app_name" ><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter></activity></application>
Solution 4:
You should make an entry of activity like below
<activityandroid:name=".Dateactvity" ></activity>
Not under application tag
<applicationandroid:name=".Dateactvity"></application>
http://developer.android.com/guide/topics/manifest/manifest-intro.html
Solution 5:
In your manifest file you have to register your DateActivity
using <activity>
tag not with <application>
tag.
<applicationandroid:allowBackup="true"android:icon="@drawable/ic_launcher"android:label="@string/app_name"android:theme="@style/AppTheme" ><activityandroid:name="com.nous.demoexample.MultiColumnActivity
android:label="@string/app_name" ><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter></activity><activityandroid:name="com.nous.demoexample.Dateactvity
android:label="@string/app_name"/>
and start your Dateactivity
as below:
Intent intent = newIntent(MultiColumnActivity.this,Dateactvity.class);
startActivity(intent);
Post a Comment for "How To Fix Unable To Find Explicit Activity Class"