Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to define several activities from different packages inside the manifest file?
    text
    copied!<p>I am having this problem fro couple of days. I have two packages in my project. From my home(inside home package) activity i will call my profile activity (inside proifle package)using a buttons onClickListener method. Heres the code</p> <pre><code> private OnClickListener bProfileListener = new OnClickListener() { public void onClick(View v) { Toast.makeText(getApplicationContext(), " You are heading to your Profile page", Toast.LENGTH_SHORT).show(); Intent intent = new Intent(v.getContext(), Profile.class); startActivityForResult(intent, 0); } }; } </code></pre> <p>Heres my manifest file. First I defines the package name like this package="com.and.profile".</p> <pre><code>&lt;application android:label="@string/app_name" android:icon="@drawable/icon"&gt; &lt;activity android:name=".home.Home" android:launchMode="singleTask" android:stateNotNeeded="true" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.HOME"/&gt; &lt;category android:name="android.intent.category.DEFAULT"/&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;activity android:name=".profile.Profile" android:label="@string/app_profile" android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar"&gt; &lt;/activity&gt; &lt;activity android:name=".profile.CustomListViewDB" android:label="@string/app_profile" android:icon="@drawable/icon"&gt; &lt;/activity&gt; &lt;/application&gt; </code></pre> <p>When I run this method I am getting this main error....... ERROR/AndroidRuntime(791): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.and.profile.Profile}; have you declared this activity in your AndroidManifest.xml?</p> <p>Can anybody tell me what to do. Am i missing something? Thanks in adcance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload