Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Java
//mainactivity java

package com.example.helloworld; 
import android.os.Bundle; 
import android.app.Activity; 
import android.view.Menu;
import android.content.Intent; 
import android.view.View; 
public class MainActivity extends Activity {
	@Override 
public void onCreate(Bundle savedInstanceState) <big></big>//point of error
	{ super.onCreate(savedInstanceState); 
	setContentView(R.layout.activity_main); }
	
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) 
	{
		getMenuInflater().inflate(R.menu.main, menu); 
	return true; 
	} 
	// broadcast a custom intent. 
	
	public void broadcastIntent(View view)
	{ 
		Intent intent = new Intent(); 
		intent.setAction("com.tutorialspoint.CUSTOM_INTENT"); 
		sendBroadcast(intent); 
		} 
	}
Posted
Updated 25-Jan-15 22:14pm
v3
Comments
Sergey Alexandrovich Kryukov 26-Jan-15 2:30am    
In what line? Anyway, the problem is extremely simple, just check up the indices you use.
—SA
Member 11402033 26-Jan-15 3:56am    
"public boolean onCreateOptionsMenu(Menu menu) " this the line i m having problem, i m using eclipse, n coded all according to the tutorial
Richard MacCutchan 26-Jan-15 4:23am    
There is probably something missing, or wrong in your resource files. Use your debugger to collect more information.
Member 11402033 26-Jan-15 5:06am    
when i debug , the problem still persist, its not getting me any other information

1 solution

Please activate the line numbers for the editor of your IDE.
The IDE will tell you in which line that happens.

You can also Debug the exception.
Please refer to the online help for your IDE for that.
 
Share this answer
 
Comments
Member 11402033 26-Jan-15 3:52am    
i m using eclipse, coding exactly according to the tutorial, the error comes up here "public boolean onCreateOptionsMenu(Menu menu) "......dont know what to do next

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