18

SRC folder in Eclipse is empty (MainActivity class not created) after creating a new android project using Eclipse-

I created a new android project using Eclipse. But I am seeing SRC folder is empty in the project explorer. But as per my understanding it should create few .java files automatically like MainActivity.java.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
subin
  • 191
  • 1
  • 1
  • 4
  • 1
    Is it new Eclipse & SDK ? – Lucifer Mar 07 '14 at 07:03
  • while creating a new android project it will ask for the mainactivity to be created or not[with check box]. Try it one more time. – Shriram Mar 07 '14 at 07:12
  • possible duplicate of [ADT will not allow creation of Android Activity](http://stackoverflow.com/questions/22190578/adt-will-not-allow-creation-of-android-activity) – laalto Mar 07 '14 at 07:57
  • http://stackoverflow.com/questions/22190578/adt-will-not-allow-creation-of-android-activity got solution from above link... This s the solution Okay, this worked for me: "Help" -> "Install new software" and install (this will update it) from this url: https://dl-ssl.google.com/android/eclipse/ I guess the Android website doesn't have an up-to-date version of ADT? Not sure where you're supposed to download the latest version from. – NewShelbyWoo – subin Mar 08 '14 at 20:44

4 Answers4

19

I had this problem for the longest time. When creating the android application, use "empty activity" instead of "blank" activity. Fixed the problem for me immediately.

Hope this helps :)

Scumble373
  • 227
  • 3
  • 7
10

Go to following:
'Help'->'Install New Software' and type https://dl-ssl.google.com/android/eclipse/

Select ADT option and install it. It will update the ADT.

Even I had the same problem and my issue got resolved with it!!

Suraj Dubey
  • 536
  • 6
  • 11
0

After entering the Application Name, Project name, etc in the New Android Application window, the next window shown is this :enter image description here

Make sure you check the Create Activity checkbox, otherwise the activity will not be created by default.

You still can create an activity by right-clicking on the project and New > Other > Android > Android Activity. But you have to make sure you check the Launcher Activity checkbox in case it is the first activity of your application

desidigitalnomad
  • 1,443
  • 21
  • 33
  • 2
    I have tried both methods outlined, the one of Creating a project from scratch and New > Other > Android > Android Activity, still nothing. How can I alleviate this problem? – Sauron Dec 14 '14 at 00:39
0

I hope this helps someone :)

I had the same 'error' and it appears to me if when creating the app I use in the 'application name' non ASCII characters !

Example: čžšćđ...

So do NOT USE čžšćđ in Application Name !!!

and yes I know it's not good practice to use them in programing :D

BRap
  • 529
  • 2
  • 10
  • 29