Second Activity In Android
Solution 1:
The log will tell you more info (either run adb logcat
from the commandline, or look at the logcat tab in eclipse). Did you remember to add your new activity to the manifest file? every activity needs to be declared in the AndroidManifest.xml file.
And no, you don't need separate layout xml files for each activity, you can share layouts if you want.
Solution 2:
Register second activity in your AndroidManifest.xml file.
<activityandroid:name =".SecondActivityName" />
Solution 3:
check if you added the second activity to the manifest file correctly. If you are not sure whether you declared the second activity in the right format, try visiting and reading the things about setting up a second activity on this site:
http://developer.android.com/training/basics/firstapp/starting-activity.html
can't see any other errors with ur code with the information given. good luck.
Solution 4:
You need to add the name of the Activity to your Manifest.
<activityandroid:name="com.example.packagename.ActivityName"></activity>
That should solve your problems.
Post a Comment for "Second Activity In Android"