Click here to Skip to main content
15,881,424 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hello,
I have encountered an error after adding a third activity to my code. The code generating the error is the following:
Java
public void onClick(View v) {
				Intent callIncomeIntent = new Intent(v.getContext(), Add_Income.class);
				startActivityForResult(callIncomeIntent, 0);
			}
		});

Generates error :
E/AndroidRuntime(13211): java.lang.RuntimeException: Unable to start activity ComponentInfo{tei.ptix.income_management/tei.ptix.income_management.Add_Income}: java.lang.NullPointerException

When I hover mouse over Intent it givees the following text:
android.content.Intent.Intent(Context packageContext, Class
Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc.

Can someone please suggest a solution?
Thanks in advance.
Posted
Updated 18-Nov-14 12:03pm
v3
Comments
DamithSL 18-Nov-14 23:07pm    
you better provide full LogCat details related to this issue
Richard MacCutchan 19-Nov-14 3:58am    
One of the parameters to your new Intent call is not valid, use your debugger to find which one it is.
Krunal Rohit 3-Dec-14 9:20am    
It's right. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900