Override Activity from Library project in Android project
<p>I have the Android project. Now I need the second edition of the Project.</p>

<p><strong>What will differ:</strong>
New edition of the Project should have different content in one of the Activities.</p>

<p>I was thinking about library project and two new projects(<code>project1</code> and <code>project2</code>) which will use library project.
But I don't really get how to setup this. Just convert original project into library, then create two new projects and <em>then what</em>? How to make <code>project1</code> use <code>activity1</code> and <code>project2</code> use <code>activity2</code> in  the same place?</p>

<p><strong>EDIT</strong>
What I've setupped:</p>

<p><strong>MainProject, a library</strong> has MainActivity.java and ChildActivity.java</p>

<hr>

<p>AndroidManifest.xml</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.mainproject"&gt;
    &lt;application&gt;
        &lt;activity
            android:name=".MainActivity"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity
            android:name=".ChildActivity"&gt;
        &lt;/activity&gt;
    &lt;/application&gt;
&lt;/manifest&gt;
</code></pre>

<p>MainActivity.java</p>

<pre><code>   public class MainActivity extends Activity {

        @Override
        public void onCreate(Bundle savedInstanceState) {

            ((Button)findViewById(R.id.button1)).setOnClickListener(new OnClickListener() {

                @Override
                public void onClick(View v) {
                    Intent intent = new Intent(MainActivity.this, ChildActivity.class);
                    startActivity(intent);
                }
            });
        }
}
</code></pre>

<p><strong>StandAloneProject:</strong> it has only ChildActivity.java</p>

<hr>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.standaloneproject"&gt;
    &lt;application&gt;
        &lt;activity
             android:name="com.example.mainproject.MainActivity"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity
            android:name=".ChildActivity" &gt;
        &lt;/activity&gt;
    &lt;/application&gt;
&lt;/manifest&gt;
</code></pre>

<p><strong>What I expect:</strong></p>

<p>When I launch StandAloneProject and click button, I want ChildActivity from StandAloneProject(not from MainProject) to be launched.</p>

<p><strong>What I get:</strong></p>

<p>When I launch StandAloneProject, I see MainActivity from MainProject, click button and get:</p>

<pre><code>android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.standaloneproject/com.example.mainproject.ChildActivity}; have you declared this activity in your AndroidManifest.xml?
</code></pre>
