1

I've googled, asked, searched, done everything but I don't have enough info about my questions. Here it is: I'm working on a project. For this project, I must add a tab panel (called education) top of launcher next to applications and widgets tabs. Here you can see. But I'm a beginner and there is nothing on the web. Any documents, vides etc.. Yes, you can say "there are too many but you couldn't see". But all of this documents about 4.0 ICS or 2.2

I need an information about android 4.1 JB.Here is my question exactly: I've downloaded all of sdk files and I'm sure that I included adt to eclipse (because some options are enabled) but even I can't see create a new android project option.

The second problem: I included the launcher2 file (I got it from original source file) but eclipse showed me too many error. They can't be real errors because 'Launcher2.apk' is a working file on Android 4.1 JB you know :)

Yes, please help me to editing Android 4.1 JB's launcher for adding a new tab panel.. Thank you.. (Sorry for my english and inexperience)

(Pictures are here. Take a look)

Errors New Android Project

iedmrc
  • 742
  • 2
  • 8
  • 21
  • New Android Project is now called "Android Application Project" – jnthnjns Aug 27 '12 at 20:40
  • If you have the source to Launcher2 then just go to File->Import->Android->Existing Android Project into workspace. Then you should probably need to run Clean and Build, if you don't already have Automatically build set – jnthnjns Aug 27 '12 at 20:42

2 Answers2

0

New Android Project is now called "Android Application Project"

If you have the source to Launcher2 then just go to File->Import->Android->Existing Android Project into workspace. Then you should probably need to run Clean and Build, if you don't already have "Build Automatically" set.


Edit:

Okay, after looking at your images and doing some more research I need you check something out for me.

  1. Open up FocusHelper.java
  2. Look at all of the import statements at the top.
  3. If you see any that reads import android.R then delete that line.
  4. Save the file and see if that removes some of these errors you are getting.
  5. If that works then you'll need to go into each error throwing file and repeat steps 2 and 3.

I have run into this issue before and doing those steps cleared this up for me. It seems to be a common Eclipse bug

Also, your SDK build is set to Android 4.0 API 14 but from what I am reading on the Advanceable class you'll need API level 16, which is 4.1.


Edit 2:

When I tried doing this I found that there are lots of missing declarations which you'll have to go through and declare yourself, there are also import references that aren't found, you'll have to either find them and import them into your project and reference them accordingly or remove them and have a slightly less functional Launcher. Check out this answer.

First thing first, I found that when you initially import the project, if a R.java doesn't auto-generate in the gen/com.android.launcher/ package then just create an XML dummy file in your res/values/ folder (you could quite possibly do this anywhere inside the res folder) and it will then generate an R.java at that point, then delete that file. You WILL need the import com.android.launcher.R; line but at this point you should see a LOT of errors clear out, assuming your settings are set to "Build Automatically". Once that is complete then double click on each error line and it will take you to that error, you can fix by declaring variables (and initializing them in most, if not all cases), pressing CTRL+SHIFT+O, removing @Override, etc. You will NOT have all the functionality, but once complete you will have something to work with.

Community
  • 1
  • 1
jnthnjns
  • 8,962
  • 4
  • 42
  • 65
  • Thank you for your answer and I got 'android application project'.. I hit clean button but still errors are here, And the build button is disabled. I can't hit it. If you say okey, I can send you photos of errors.. – iedmrc Aug 27 '12 at 20:58
  • Can you print screen the errors and upload and send me the links, I'll take a look at them and see if I can help you. – jnthnjns Aug 29 '12 at 12:29
  • here: http://goo.gl/yBsCE and here is the launcher2 source code (haven't compiled): http://goo.gl/jHnCI please take a look, thank you.. – iedmrc Aug 29 '12 at 16:13
  • Check out the edit I just made to my answer, I think this could fix your issues. Let me know if it works. – jnthnjns Aug 29 '12 at 17:02
  • Thank you man.. But I saw this line import com.android.launcher.R; like you said import android.r and I deleted it. I Saved the file but still there are the same error. Can you open the launcher that I sent with your eclipse and say me does your eclipse have errors?.. About android version, how can I change it to api 16? or what should I do about this prob.? Thank you for your help and I don't find any other man for help me :) – iedmrc Aug 29 '12 at 17:24
  • I ran into the same errors as you, it would take too long for me to look into rebuilding the source to make it work. Seems like a lot of people are having those same errors when importing Launcher2 source. Have you thought about getting the [ADWLauncher source](http://code.google.com/p/adw-launcher-android/) instead?? – jnthnjns Aug 29 '12 at 21:40
  • Check my new answer, also remember to change your build path to API 16. Sorry I couldn't help you more, but I hope this answers your question. – jnthnjns Aug 30 '12 at 12:45
0

You will not be able to build Launcher using the Android SDK because it uses some private APIs (the errors you are seeing).

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134