I always get an error when I run my created application and based on my research I haven\'t registered my Activity in the manifest. How can I register a new activity in And
Assuming you're using Eclipse,
Goto your Android Manifest
, goto the Applications
Tab (at the bottom), click on "Add", Choose Activity. On the right, next to Name:
Click on Browse
, to get a list of available activities, just add it and you're set! :)
You could right way just edit the Manifest XML aswell. It's upto you.
<activity android:name="com.kl.android.ReadSMS.ViewSMS" />
In Android Studio, Go to AndroidManifest.xml file and use
<activity android:name="YourPackageName.ClassName">
For example,
<activity android:name="com.android.favoritetoys.MainActivity">
For More List of activity attributes in AndroidManifest.xml
just use the class name after '.' like the following
<activity android:name=".ViewSMS"/>