New Project - An SDK Target must be specified


Last Updated:

  1. techlover

    techlover New Member This Topic's Starter

    Joined:
    Oct 15, 2009
    Messages:
    1
    Likes Received:
    0
    Hi Folks,
    I'm sorry if you've heard this one before - I've had a look through the forums and can't find any solution that works.

    So I try to create a new project and I get the above error in the New Android Project window. I've tried setting the SDK location preference in Window / Preferences / Android and it points to the folder that contains the \tools directory. Now I'm stuck. Can anyone offer any help? Much appreciated if you can.
    Cheers,
    Andy

     

    Advertisement
  2. sjosh_theone

    sjosh_theone New Member

    Joined:
    Oct 28, 2009
    Messages:
    2
    Likes Received:
    0
    Check if you have the directories like "android <sdk target>" in <sdk-home>/platforms .
    <sdk target> can be 1.1, 1.5, 1.6 or something like that.
    I have them but eclipse still cant find them while creating a new project project. The " build target" field is still empty.

    Help needed.

    Thanks in advance.
     
  3. sjosh_theone

    sjosh_theone New Member

    Joined:
    Oct 28, 2009
    Messages:
    2
    Likes Received:
    0
    Damn!!!!

    Check out how to build the "hello android" tutorial in Hello, World | Android Developers

    When we create a new project in eclipse , all the fields are required . I filled up all the fields with the appropriate values and the error vanished. I read on that same page that target is automatically selected. You dont have do anything extra.

    It should have been mentioned somewhere.
     
  4. mclance81

    mclance81 New Member

    Joined:
    Nov 14, 2009
    Messages:
    1
    Likes Received:
    2
    Incase not, go to window menu option and select preferences. Here you can specify the android sdk from the android download file, android-sdk-window.
     
    bmcbride and sandman2020 like this.
  5. JimD

    JimD New Member

    Joined:
    Nov 14, 2009
    Messages:
    2
    Likes Received:
    0
    I had the same problem, and hunted all over until I had a brainwave.
    I moved the eclipse form up until half of it was off-screen, then dragged the bottom edge of the frame, to extend it. I could then see there were more options to complete, and a selection list, that didn't show up before.

    I'm using Eclipse on Linux by the way...

    Jim
     
  6. ricky

    ricky New Member

    Joined:
    Nov 15, 2009
    Messages:
    1
    Likes Received:
    0
    Hello all,

    I think I am getting a similar error. Im sure im doing something really silly but i had added the location of the sdk to the preferences and i get no targets.

    Please see the screen shot attached.

    I am using - Eclipse SDK Version: 3.5.1, windows Vista and Android sdk r3

    I hope you can help :)
     

    Attached Files:

  7. KeithG

    KeithG Well-Known Member

    Joined:
    Nov 15, 2009
    Messages:
    103
    Likes Received:
    3
    Best Answer
    Two thumbnails below. The new project, is from my eclipse setup.

    File > New > Project

    This should display a window where you can select what kind of project to create. open the android folder, and select android project. You should also see an android test project option as well. After selecting Android project and hitting OK, you should receive the new android project dialogue. Thats the screen shot below new-android-project. Its a very tall screen as a previous poster mentioned.

    In the middle of that screen shot is the build target selection. You need to specify what target your building against by checking one of the boxes.


    The second screen shot is the Project properties window, which you can get to by right clicking on the main project folder (in the package explorer) and selecting properties. The screen shot depicts the properties dialog from the SDK's ApiDemos project. Notice it has an android entry on the left which I've selected. In there is the Build target for the project. This can be changed at any time so you can re-target against other api levels.

    If you import or create a base Java project and forget to tell it, it's an Android project ... You can right click on the project folder in the package explorer and select:

    Android Tools > Convert to Android Project

    After that you might need to right click again, and this time:

    Android Tools > Fix Project Properties

    You will then need to specify what build target your project will build against.


    If Window > Preferences > Android, doesn't show build targets with your SDK location provided ... you'll need to fix that before anything else will work.
     

    Attached Files:

  8. A-Star

    A-Star New Member

    Joined:
    Nov 16, 2009
    Messages:
    1
    Likes Received:
    0
    I had the same problem and that's the solution. I 'm at 800x600 and when changing to 1024x768 the target option shows up :D
    Also, make sure you have any target avaliable

    If not, probably you ignored point 3. on the SDK setup

     
  9. borgir

    borgir New Member

    Joined:
    Dec 25, 2009
    Messages:
    1
    Likes Received:
    0
    Hey there!
    This happens because your SDK is not installed.
    Probably when running the setup you got the error:
    Failed to fetch URL http://dl-ssl.google.com/android/eclipse/repository.xml, reason: File not found

    So, you should go to:
    settings > force https://... sources to be fetched using http://...
    and check this option. Then try to install the packages again.
    If you not succeed, find the file androidtool.cfg and add the following line:
    sdkman.force.http=true

    I hope it works.
    Cheers!
     
  10. eazyigz

    eazyigz New Member

    Joined:
    Dec 27, 2009
    Messages:
    2
    Likes Received:
    0
  11. fotorebelion

    fotorebelion New Member

    Joined:
    Jan 6, 2010
    Messages:
    3
    Likes Received:
    0
    hello i am new to andriod... i have been trying to get the setup going for making my own apps.. i follwed all the steps..
    downloaded the android sdk -android-sdk_r04-linux_86.tgz
    all this works
    ran android (the emultor) actulized the sdk from de dl-google. repos
    then i downloaded the the ADT from eclipse.. this worked fine.. now i can run de AVD from with in eclipse, and in window - preferance- is the list of android sdks, i select android sdk 1.6 then apply ok.. window closes (i asume that this means all ok)
    But then when i go to New - android project... i get an error saying that and SDK target must be selected....
    i thought i did that in the previous step..
    whats am i doing wrong??
     
  12. KeithG

    KeithG Well-Known Member

    Joined:
    Nov 15, 2009
    Messages:
    103
    Likes Received:
    3
    Whats your screen resolution? anything below 1280x1024 will cause the new project dialog to collapse ... which means you don't see the "select target" portion of the new project dialog. you need to resize the dialog until you can select a target.

    If the project is already created..... in the project / package explorer (folder view left hand window pane), right click your project and select properties.

    In the "Properties for XXX" dialog select "android" option on the left, select a target in the main window of the dialog and then Apply / OK.

    You should be able to to then rebuild / run the project successfully.
     
  13. fotorebelion

    fotorebelion New Member

    Joined:
    Jan 6, 2010
    Messages:
    3
    Likes Received:
    0
  14. KeithG

    KeithG Well-Known Member

    Joined:
    Nov 15, 2009
    Messages:
    103
    Likes Received:
    3
    Your 800 vertical pixels is not sufficient for the dialog as mentioned above. It has collapsed the "build target" widget on screen so you don't see any build targets to select. You need to make the window taller.

    On a linux system you can hold down the alt key and click drag the window up... so you can expand the bottom frame of the window down. Continue moving the window this way until you can select a build target from the list.

    Once you have a build target selected, you can always change the current build target for the project, under the projects properties page, which I mentioned in my last post.

    This is the properties page for eclipse, not an existing project properties page.
     
  15. Turin

    Turin New Member

    Joined:
    Jan 14, 2010
    Messages:
    1
    Likes Received:
    0
    Hi all!
    I have a 10'' netbook (1024x600) and the same trouble.
    A quick solution is to change the font size at:
    "Control Panel\All Control Panel Items\Personalization\Window Color" and Advanced appearance Settings (Windows 7)

    Now I can choose build target using tab, arrows and space bar.
     
  16. Cheesehead

    Cheesehead New Member

    Joined:
    Jan 16, 2010
    Messages:
    1
    Likes Received:
    0
    I figured out to do it, with Win7, and SDK of r04...

    Alright what I did, was I started Eclipse>Window>Preferences>Android SDK and AVD Manager>On the left click Available Packages>Check mark the https://dl-ssl.google...etc> Now uncheck every single box,(but the website one at the top, of course.)>Now check that is closest to the top with the regular android, green alien sign, and not the one where it is gray with a plus sign.

    For me the only one I checked was the one that said SDK Platform Android 2.0.1, API7, revision1... or something around those lines.

    For some reason, installing them all at once did not work for me, which was a waist of 2 and a half hours... let me know if this helped, or if you need something clarified
     
  17. SteeveChain

    SteeveChain New Member

    Joined:
    Jan 17, 2010
    Messages:
    2
    Likes Received:
    0
  18. mhc

    mhc New Member

    Joined:
    Jan 25, 2010
    Messages:
    2
    Likes Received:
    0
    I've the same problem.

    My laptop screen resolution is 1024x768.
    I've two Eclipse-Android installations. The one under native host WIN XP Pro SP3 works fine with New Project Wizard. The other under Ubuntu 9.10 (running within a VM of Virtualbox 3.12) suffers exactly the same syndrom:
     
  19. mhc

    mhc New Member

    Joined:
    Jan 25, 2010
    Messages:
    2
    Likes Received:
    0
    I followed KeithG's suggestion again, Yes it works! Thanks much!

    As a little clarification:
    1) Hold down Alt-key while dragging the dialog-box "New Android Project" upward until its bottom is revealed -- you will find it's a very tall window.

    2) Press Alt-F8, and now you can expand the dialogue box downward, until the "Build-Target list box fully appears
     
  20. wangsuya

    wangsuya New Member

    Joined:
    Feb 18, 2010
    Messages:
    4
    Likes Received:
    0
    I have same problem, but read this replay still do not understand how to solve it. I read whole thread anwer still can not find real anwer. Totally how to sovle the probme "New Android Project An SDK Target must be specified"
     
  21. nguyendat

    nguyendat Member

    Joined:
    Jan 21, 2009
    Messages:
    6
    Likes Received:
    2
    Hi, i just solved this problem on Eclipse Galileo on Ubuntu 8.04, Please follow steps:

    A. Cause
    Not select Device on "Build Target"

    B. Solution:
    Step 1. Check install SDK follow instruction
    Adding SDK Components | Android Developers

    Step 2. Create an AVD (Android Virtual Device) by command follow instruction:
    Hello, World | Android Developers

    Or creat AVD by Window -> Android SDK and AVD Manager -> Virtual Device -> New -> Setting your new devive

    Step 3. Creat New Project
    File -> New -> Project -> Android Project -> Select Build target
    (If you can't select check box "Build target" there are 2 solution for solved it
    1. Select by continous press tab for select Device on Build target
    2. Resise "New Android Project" window to large size (Or increase your resolution of screen) till you can select an item in Build target

    Regards
     
    huynp85 likes this.
  22. paranoid&android

    paranoid&android New Member

    Joined:
    Feb 26, 2010
    Messages:
    1
    Likes Received:
    0
    I finally figured out why Build Target is empty in New Android Project

    Just pull the bottom of the window down further!!!
     
  23. davidtay

    davidtay New Member

    Joined:
    Mar 26, 2010
    Messages:
    1
    Likes Received:
    1
    This is precisely the reason why most people don't take Java developers seriously.
     
    codeharrier likes this.
  24. Xaivior13

    Xaivior13 New Member

    Joined:
    Apr 10, 2010
    Messages:
    2
    Likes Received:
    0
    I was just recently having this same issue, I'm running Fedora 12 Linux, but I'll probably also be installing Eclipse on my Windows 7 partition. I was trying everything... not even Tab (until I enter the window) and enter would work - you have to click on the SDK or something of the sort, but hey - does everyone who had this problem run their OS on a widescreen monitor? I thought I saw complaints/issues from Win7/UNIX users alike... hm... you never know.

    However, I did look at "Test Project" (an option right under "New Android Project" for me), and they had the SDK Target window out and ready to be clicked.

    Oh, well, it's working now, and I may start developing WOOHOO!
     
  25. shodhanshah

    shodhanshah New Member

    Joined:
    Jul 8, 2010
    Messages:
    3
    Likes Received:
    0

    I has same issue in Eclipse. I RESOLVED it.
    PLEASE MAKE SURE YOU PUT '\' at the end of SDK Location. My Targets were also empty earlier. After inserting '\' at the end of location , I got targets populated. Hope this will help
    <Your dir>\android-sdk-windows\
     

Share This Page

Loading...