9

I can't start new projects anymore. This is what I do...

  • Start Eclipse.
  • New Android Application
    • min API 8
    • target API 18
    • compile API 19
    • create activity : checked
    • activity name : MainActivity
    • layout name : activity_main
    • finish

When I open the project (it doesn't even open MainActivity.java as it should be) : - src folder is empty - res/layout folder is empty

But AndroidManifest.xml exists. It was working perfectly before and I was able to create projects then it just suddenly broke.

I'm using APIs 18 and 19 all installed and up to date.

Mickäel A.
  • 9,012
  • 5
  • 54
  • 71
Cookie Monster
  • 107
  • 1
  • 1
  • 6

7 Answers7

8

I had the same problem yesterday after updating the latest packages on the Android SDK Manager.

Fixed it by updating the Eclipse plugin: Run Eclipse > Help > Install new software > Paste the URL https://dl-ssl.google.com/android/eclipse/ then press Enter. After updating the plugin, I created a test project with the main activity and menu was created by default as normal.

dursunturan
  • 25
  • 1
  • 6
Werner
  • 314
  • 2
  • 11
2

I have the same problem before.

Using this Eclipse Update http://dl-ssl.google.com/android/eclipse/ did not work for me. I notice this problem when I download the latest updated SDK

enter image description here

Luckily the solution to my problem is very easy. enter image description here

By Selecting Empty Project instead of Blank Activity makes it working.

neferpitou
  • 1,642
  • 2
  • 20
  • 26
0

I had a problem with opening the layout folder. I needed a xml file with the contents as below:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
</LinearLayout>

So,this is what I did.I tried updating eclipse but, the problem persisted. So,I just created a new xml file by right-clicking the layout folder.After creating the file,I just copy-pasted the aforementioned content.Hope it helps!

Adithya
  • 43
  • 6
0

It happened to me too. It suddenly stopped creating MainActivity.java and layout. I could fix it by updating Eclipse:
Help -> Check for updates -> Select all

frogatto
  • 28,539
  • 11
  • 83
  • 129
Toporokis
  • 1
  • 1
0

I had the same problema also. I fixed the problem follow the Werner recomendation. Eclipse --> Help --> Install new software --> Pasted URL http://dl-ssl.google.com/android/eclipse/ pressed Enter, but It's important check it out and remove before any copy of the plugin installed in available Software Sites.

darupa
  • 1
0

I had the same problem also. I fixed the problem follow the Werner recomendation. Eclipse --> Help --> Install new software --> Pasted URL http://dl-ssl.google.com/android/eclipse/ It fixed my problem.

Dudi72
  • 59
  • 5
0

I've just had the same issue on Mac 10.9.1. For what appears to be no reason, when creating a new android project, the "src" directory is empty, and there's no activity_main.xml. I tried Werner's fix, but the URL had issues trying to download the files. Deleted Eclipse, and re-installed. This appears to have fixed the issue.

Actually - still having this issue, even after re-installing Eclipse...