Hi all,
I have copied and pasted the code from the Form stuff example on this website. I am getting an error when i try and run the project, the project has a little red square with a white cross on it but when drilling down into the elements of the project (using eclipse) there is element with an error. In the problems tab of eclipse I have the following text
Description Resource Path Location Type Unparsed aapt error(s)! Check the console for output. HelloFormStuff2 Unknown Android Packaging Problem
But there is nothing in the console!! Here is the code and elements that I am using...
HelloFormStuff2.java package com.android.HelloLinearLayouts;
import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.Toast;
public class HelloFormStuff2 extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);
final Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// Perform action on clicks
Toast.makeText(HelloFormStuff2.this, "Beep Bop", Toast.LENGTH_SHORT).show();
}
});
}
}
res/drawable-hdpi/android-button.xml
res/layout/main.xml android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" />