How to start an activity that is defined in other Android projects?
I have defined some common Activities in a library project and want to reuse these activity in my working project.
I declared my library project as Android library, use the fully-qualified name of the Activities and declare them in the AndroidMan开发者_如何学运维ifest.xml of the new project. However, I get 'Unable to find explicit activity class' error when launching the application.
Any other configurations shall I do in order to start the Activities?
Either your activity is not in your manifest, or there is some problem with your library project causing the activity class to not be included in the APK.
You need to use Implicit Intent and Intent Filters, check this blog entry and the android documentation for more information.
I have made a very simple sample (quick and dirty but working here): http://dl.dropbox.com/u/5289718/DummyIntent.zip
精彩评论