Im trying to do a simple application in android with a new class for learn how to use it. The main activity have :
package com.josejoaquin.testhttp;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MyActivity extends ActionBarActivity {
@Override
protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_my);
    Button Boton = (Button)findViewById(R.id.button);
    TextView Texto = (TextView)findViewById(R.id.textView);
    Boton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            clientehttp clienteweb = null;
            String total;
            total = clienteweb.getWeb();
            Texto.setText(total);
        }
    });
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.my, menu);
    return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    if (id == R.id.action_settings) {
        return true;
    }
    return super.onOptionsItemSelected(item);
}
}
And the other file is named clientehtt.java and have this code:
package com.josejoaquin.testhttp;
public class clientehttp {
   public String getWeb (){
    String texto ="Hola Mundo";
    return texto;
}
}
THe manifiest file have:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.josejoaquin.testhttp" >
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MyActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
But i get and error when i do a click the applition close, what im doing wrong? Can anyone help me to learn more about this?
Best Regards.
 
     
     
    