Reputation: 2906
Do I have to include the activities to my app's Manifest file from the package which are imported to my android app.? thanks
Logcat error:
01-13 02:28:08.392: ERROR/AndroidRuntime(2888): FATAL EXCEPTION: main
01-13 02:28:08.392: ERROR/AndroidRuntime(2888): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.s.android.test/com.s.android.test.MainActivity}: java.lang.ClassNotFoundException: com.s.android.test.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.s.android.test-2.apk]
01-13 02:28:08.392: ERROR/AndroidRuntime(2888): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1544)
Upvotes: 0
Views: 1104
Reputation: 24667
Your Logcat says java.lang.ClassNotFoundException: com.s.android.test.MainActivity
To me this implies the package name in your Manifest isn't correctly defined for that Activity.
Edit:
You need to just check the base package and the path to your activity match the actual package your activity is in. Eg:
<manifest package="com.example.project" . . . >
<application . . . >
<service android:name=".SecretService" . . . >
The SecretService class would thus be found in com.example.project.SecretService (Obviously the example shows this for a Service but the same is true for an Activity.) You should probably also read more about the fundatmentals here: http://developer.android.com/guide/topics/manifest/manifest-intro.html
Upvotes: 0
Reputation: 5491
This page states:
Currently, an application must declare in its manifest any components or resources that it is using from a library project.
So if I understood your question correctly, yes you have to redeclare the activities.
Upvotes: 1