Have you tried different names for the search activity in the manifest? Like
.SearchActivity.

BTW, I'm not sure if you can "mix" packages in one manifest, because you
have to specify one base package for your application.

On Tue, Aug 2, 2011 at 12:17 AM, dave <dayong...@gmail.com> wrote:

> Hi,
> I am using an add-on in my app.
> When  I try to start an activity defined in the add-on package, it
> complains ActivityNotFoundException:
>
> in my code:
>
> package com.a.c.demo.search;
> import com.a.b.SearchActivity;
> import com.a.c.demo.R;
>
> public class ActivityDemo extends Activity {
>   public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        Button btn = (Button)
> findViewById(R.id.launch_search_activity);
>
>        btn.setOnClickListener(new Button.OnClickListener() {
>            public void onClick(View v) {
>                Intent i = new Intent();
>                i.setClassName("com.a.b", "com.a.b.SearchActivity");
>                i.putExtra(KEY_SEARCH_HINT_TEXT, "Search");
>                ActivityDemo.this.startActivityForResult(i,
> SEARCH_CODE);
>            }
>        });
> }
>
>  <activity android:name=".search.ActivityDemo" android:label="@string/
> app_name">
>            <intent-filter>
>                <action
> android:name="android.intent.action.custom.activitydemo" />
>                <category
> android:name="android.intent.category.DEFAULT" />
>            </intent-filter>
>  </activity>
>  <activity android:name="com.a.b.SearchActivity" />
>
> the add-on is in the java build path.
> When I ran the app, I got error from log cat:
>  ActivityNotFoundException:
> Unable tofind explicit activity class {com.a.b/
> com.a.b.SearchActivity}; have you declared this activity in your
> AndroidManifest.xml?
>
> Please help me out on this issue.
> Thanks a lot.
> dave
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to