Search code examples
androideclipseadt

ADT does not load target platforms even if they are installed. How to Fix?


Symptoms:

I encountered this problem when I was creating a new Android Application project in eclipse.

I was not allowed to go past the first screen of the new project wizard because of "A package name cannot start or end with a dot"

  • Application name: Lahari
  • Project name: Lahari App
  • Package name: com.example.lahari
  • Minimum required SDK: API8: Android 2.2(Froyo)
  • Target SDK: API16: Android 4.1(Jelly Bean)
  • Compile with: (No option to select)
  • theme: Holo Light

So I started googling around and tried a lot solutions from SO and other sites.

One of the associated problem (which I hadn't realized) was that Target Platforms list was empty, the last time I tried it had loaded fine but not anymore.

SDK Manager said platforms were installed and up to date. No updates were there for ADT, SDK Tools, or Eclipse.

Problem:

In Eclipse, Windows > Tools > Preferences > Android the path was set properly but no targets would load.

My System configuration is:

  • Win 7 64 bit - all updates applied to date
  • Eclipse Juno SR1 (up to date)
  • ADT 21.0.0

Solution

  • I tried all the solutions on the web. It took me a day's time to find the working solution.

    So here's the solution:

    DISABLE YOUR ANTIVIRUS!

    Antivirus I'm using:

    Kaspersky Internet Security 2013

    This was the least expected of solutions, I know.

    I chanced upon this while I was about to re-install SDK.

    Update: This solution failed to work on another system. So this is what worked.

    1) In eclipse, Go to windows->preferences->startup and shutdown->check android ADT

    2) Restart eclipse

    I used to disable all the things in startup and shutdown as this used to make eclipse much much faster. This never created a problem before.

    However all is well again ^_^