Yes. I know this is trivial. But it becomes stupid.
Image confirming the error:
The code:
package apack.age; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; public class DisplayContactActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.display_contact_layout); } public void openSubreddit(View view) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.reddit.com"))); } public void openTwitter(View view) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://twitter.com"))); } public void openGmail(View view) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("www.gmail.com"))); } }
Seriously. There are 5 open and 5 closed braces. This is my first attempt at an Android application, but I have 3 years of Java experience, so this is pretty annoying.
Run errors. The update does nothing. A clean project does nothing. The automatic code format in eclipse (CTRL + SHIFT + F) does nothing.
EDIT 1: Copying code into a new class allows you to compile it. I am launching a new version of Eclipse: Juno. I did source -> cleanup, and it just says "don't change anything" every time!
source share