0

I am new to Android and the very first problem I have faced is that when I create a new Android application project, the Main Activity is not created. Also, if I try to add a new activity after the project has been created, nothing happens.

My ADT and SDK manager are all up to date (v23) because that is the most popular answer on other such queries.

If its a bug in the updated ADT, when can we expect a further update with this problem solved. Also, it would be great if someone can point me to a resource on learning how to manually create activities and alter manifest files.

AR10
  • 93
  • 5
  • I don't know what is happening with your eclipse. But a resource for create another Activity is available at http://developer.android.com/training/basics/firstapp/starting-activity.html#CreateActivity – Glauco Neves Jun 29 '14 at 18:55
  • If you add an activity make sure to add it to the manifest as well. – Alex Lungu Jun 29 '14 at 18:56
  • The most recent version of ADT is broken. See http://stackoverflow.com/questions/24437564/update-eclipse-with-android-development-tools-23 for details. – Code-Apprentice Jun 29 '14 at 19:06
  • @GlaucoNeves, yes thanks for that link but that is the problem I am facing. When I try to add a new activity, nothing happens. I was able to do it previously but not after the update. – AR10 Jun 30 '14 at 19:08
  • @Code-Apprentice, yes I think so too – AR10 Jun 30 '14 at 19:09

1 Answers1

0

While creating a Project . Select Empty project. Because may be it is creating frameLayout. So select Empty Project. For Creating a new Activity add a class under the package created. if the package is not created first create a package and Add a class to it. And extends the class from Activity

public class MainActivity extends Activity {


@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    setContentView(R.layout.main); // you must have to add it in xml


}
Zare Ahmer
  • 808
  • 5
  • 8