Misread the question initially (original answer below for completeness sake) Make sure you have the activity you are calling defined in your manifest file: Something like activity android:name=". BuyNow" android:label="@string/app_name">You can see the log from logcat (run via adb logcat on the command line).
Misread the question initially (original answer below for completeness sake). Make sure you have the activity you are calling defined in your manifest file: Something like within the application tags would suffice. Here's the original answer.
Assuming that you have the correct button ID - try this in your onclick: Intent myIntent = new Intent(getApplicationContext(), buyNow. Class); startActivity(myIntent); You could add a log message inside your onClick too, to make sure it is actually being called. You can see the log from logcat (run via adb logcat on the command line).
I have the activity in the manifest within the application tag: Here it is: and also I've tried this method but it still crushes! – Alin Jul 30 at 20:20 Maybe it's whatever is in your buyNow class which is causing the application to crash. You need to either step through in eclipse debugger or put in log statements to see where the program is going.At the very least you need to provide us with the logcat output so that we can help you.
– Martyn Jul 31 at 9:50.
Try to make it: startActivity(new Intent("Here is your package name. What you declared in Manifest file")); For this you need to write to your manifest: Hope it helps.
There may be a problem with your buyNow activity that is causing the error. You really need to use logcat to trace the error. You can enable this by clicking the menu item: Window -> Show View -> Other... the selecting "LogCat" from the Android folder.
I've managed to solve the problem! Thanks for all of your help! – Alin Jul 30 at 21:17 Glad to hear it ... Please remember to upvote any answers that were helpful.
Also accept a correct answer if applicable. This provides a useful metric for our community. You can read more on How does accepting answers work – Merlin Jul 30 at 21:22.
I'm new to Android Dev, so please help me out. I'm trying to start a new activity after I press a button but nothing seems to work. I've also added this new activity in the Manifest but it keeps crushing after I press the button.
What am I doing wrong?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.