Android: Unable to start activity. ClassCastException : android.Widget.Button
I get the exception when I start my app, although there is no syntax error and the ids and variable names match. I tried rebuilding the R file, cleaning the project, restarting the emulator, Eclipse, nothing worked.
There is only one button, and even commenting the code that includes the button doesn't solve it. I'm a beginner, so bear with me :)

This is my main activity:

    package com.android.hangman;
    
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.util.ArrayList;
    import java.util.Random;
    
    import android.app.Activity;
    import android.content.res.AssetManager;
    import android.os.Bundle;
    import android.text.InputFilter.LengthFilter;
    import android.view.View;
    import android.widget.*;
    
    public class Hangman extends Activity {
        
    	TextView word, tries, cuvant, incercari, letter;
    	EditText litera;
    	Button newG;
    	int valIncercari = 5;
    	ArrayList<String> cuvinte = new ArrayList<String>();
    	
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            
            word = (TextView)findViewById(R.id.word);
            tries = (TextView)findViewById(R.id.tries);
            cuvant = (TextView)findViewById(R.id.cuvant);
            incercari = (TextView)findViewById(R.id.incercari);
            letter = (TextView)findViewById(R.id.letter);
            newG = (Button)findViewById(R.id.newG);
            litera = (EditText)findViewById(R.id.newG);
            
            
            AssetManager am = this.getAssets();
            try {
    			InputStream is = am.open("cuvinte.txt");
    			InputStreamReader inputStreamReader = new InputStreamReader(is);
    			BufferedReader b = new BufferedReader(inputStreamReader);
    			String rand;
    			while((rand=b.readLine())!=null){
    				cuvinte.add(rand);
    			}
    		} catch (IOException e) {
    			Toast.makeText(this, "No words file", Toast.LENGTH_LONG).show();
    			e.printStackTrace();
    		}
            
            
        }
        
        public void newGame(View view){
        	Random rand = new Random();
        	String stringCuvant = cuvinte.get(rand.nextInt(cuvinte.size()));
        	cuvant.setText("");
        	for(int i = 0; i< stringCuvant.length(); i++){
        		cuvant.append("_ ");
        	}
        	incercari.setText(valIncercari);
    	}
    }
    
    		
The XML:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    
        <LinearLayout 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
        		<TextView 
        		    android:id="@+id/word"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text="Word"/>
        		<TextView 
        		    android:id="@+id/tries"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text="Tries"/>
        		
        </LinearLayout>
    
            <LinearLayout 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            	<TextView 
        		    android:id="@+id/cuvant"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text=""/>
            	<TextView 
        		    android:id="@+id/incercari"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text="5"/>
        </LinearLayout>
        
        <LinearLayout 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            	<TextView 
        		    android:id="@+id/letter"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text="Letter"/>
            	<EditText 
            	    android:id="@+id/litera"
            	    android:layout_width="wrap_content"
            	    android:layout_height="wrap_content"/>
        </LinearLayout>
            <Button 
                android:id="@+id/newG"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="NEW GAME"
                android:onClick="newGame"
                android:gravity="bottom"/>
    </LinearLayout>

And the exception:

    06-25 11:22:35.402: E/AndroidRuntime(337): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.hangman/com.android.hangman.Hangman}: java.lang.ClassCastException: android.widget.Button

Thank you in advance for your answers!
Android: Unable to start activity. ClassCastException : android.Widget.Button
===

I get the exception when I start my app, although there is no syntax error and the ids and variable names match. I tried rebuilding the R file, cleaning the project, restarting the emulator, Eclipse, nothing worked.
There is only one button, and even commenting the code that includes the button doesn't solve it. I'm a beginner, so bear with me :)

This is my main activity:

    package com.android.hangman;
    
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.util.ArrayList;
    import java.util.Random;
    
    import android.app.Activity;
    import android.content.res.AssetManager;
    import android.os.Bundle;
    import android.text.InputFilter.LengthFilter;
    import android.view.View;
    import android.widget.*;
    
    public class Hangman extends Activity {
        
    	TextView word, tries, cuvant, incercari, letter;
    	EditText litera;
    	Button newG;
    	int valIncercari = 5;
    	ArrayList<String> cuvinte = new ArrayList<String>();
    	
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            
            word = (TextView)findViewById(R.id.word);
            tries = (TextView)findViewById(R.id.tries);
            cuvant = (TextView)findViewById(R.id.cuvant);
            incercari = (TextView)findViewById(R.id.incercari);
            letter = (TextView)findViewById(R.id.letter);
            newG = (Button)findViewById(R.id.newG);
            litera = (EditText)findViewById(R.id.newG);
            
            
            AssetManager am = this.getAssets();
            try {
    			InputStream is = am.open("cuvinte.txt");
    			InputStreamReader inputStreamReader = new InputStreamReader(is);
    			BufferedReader b = new BufferedReader(inputStreamReader);
    			String rand;
    			while((rand=b.readLine())!=null){
    				cuvinte.add(rand);
    			}
    		} catch (IOException e) {
    			Toast.makeText(this, "No words file", Toast.LENGTH_LONG).show();
    			e.printStackTrace();
    		}
            
            
        }
        
        public void newGame(View view){
        	Random rand = new Random();
        	String stringCuvant = cuvinte.get(rand.nextInt(cuvinte.size()));
        	cuvant.setText("");
        	for(int i = 0; i< stringCuvant.length(); i++){
        		cuvant.append("_ ");
        	}
        	incercari.setText(valIncercari);
    	}
    }
    
    		
The XML:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    
        <LinearLayout 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
        		<TextView 
        		    android:id="@+id/word"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text="Word"/>
        		<TextView 
        		    android:id="@+id/tries"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text="Tries"/>
        		
        </LinearLayout>
    
            <LinearLayout 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            	<TextView 
        		    android:id="@+id/cuvant"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text=""/>
            	<TextView 
        		    android:id="@+id/incercari"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text="5"/>
        </LinearLayout>
        
        <LinearLayout 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            	<TextView 
        		    android:id="@+id/letter"
        		    android:layout_width="wrap_content"
        		    android:layout_height="wrap_content"
        		    android:text="Letter"/>
            	<EditText 
            	    android:id="@+id/litera"
            	    android:layout_width="wrap_content"
            	    android:layout_height="wrap_content"/>
        </LinearLayout>
            <Button 
                android:id="@+id/newG"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="NEW GAME"
                android:onClick="newGame"
                android:gravity="bottom"/>
    </LinearLayout>

And the exception:

    06-25 11:22:35.402: E/AndroidRuntime(337): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.hangman/com.android.hangman.Hangman}: java.lang.ClassCastException: android.widget.Button

Thank you in advance for your answers!