[TUTORIAL] To Everyone Looking For .jar Files

  ... tutorials on how to use AndEngine.

[TUTORIAL] To Everyone Looking For .jar Files

Postby Skripi » Wed Aug 24, 2011 9:06 am

Sup guys,

If yo'uve been going to the andengineexamples google code repository and finding all the .jar files missing :o It's cause Nicholas has changed some things!

If you look at his update:
"Now using related projects as Android library projects." It shows that you need to make a project containing the AndEngine source code which you'll update with Mercurial or whatever you use to update online repositories and then link your project to that project.

So pull a copy of the new repository and get back to your games!!

Tutorial:
1. Get the Source Code from GoogleCode and create a new Project with it

- If you're using Eclipse, use the Mercurial plug-in (Help → Software Updates in Eclipse, then install: http://cbes.javaforge.com/update).

- Go to File->Import->Mercurial->Clone Existing Mercurial Repository

- In the Repository Location URL box type in: https://code.google.com/p/andengine/

- Hit next. It should start cloning the repository...

- Then select the 'default' branch and hit next. Then ensure you have the box selected to import the project to your workspace.

And you're done importing the project! Now let's link your project to it..


This is what it should look like when you have them all imported:
Image

2. Link your project to the project you just made

- Right-Click your project then Build Path->Configure Build Path...
Image

- Then under the 'Source' tab hit "Link Source".. and select the src folder of the AndEngine project
Image

Link this
Image

Image

And you're done!!

Image

This can also be done with all the extensions! just go to the extensions forum and check out Nicholas's sticky link to the source code :)

Hope this helps guys! =D
Last edited by Skripi on Thu Aug 25, 2011 5:30 am, edited 3 times in total.
Please rush me my portable walrus cleaning kit. Yes I am over 18 but my IQ isn't.
Skripi
 
Posts: 61
Joined: Wed Aug 11, 2010 5:35 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Ziden » Wed Aug 24, 2011 6:10 pm

WHen i select the src folder for the andEngine project source, it says "folder is already a source folder". I can copy/paste the folder tho, but then, it wont be updated, right ?

Thanx for the tutorial bro, really helped.
-------------------------------
Gabriel Slomka
Ziden
 
Posts: 11
Joined: Wed Aug 24, 2011 3:58 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Skripi » Wed Aug 24, 2011 6:25 pm

Hey dude!

Yeah, copying the folder will mean it won't get updated :(

It sounds to me like you might be editing the wrong build path! Ensure you're editing the build path of your project and linking the src folder of the andengine project that you cloned. These will both be 2 different projects.

Hope that helps!
Skripi
Please rush me my portable walrus cleaning kit. Yes I am over 18 but my IQ isn't.
Skripi
 
Posts: 61
Joined: Wed Aug 11, 2010 5:35 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Ziden » Wed Aug 24, 2011 7:04 pm

I made a project called Test, and i am linking Test to AndEngine src folder. Still, i cant link it , says ts already a source folder. If i copy/rename and link, it seems i cant do it ! =(

thanx for the attention and for the tutorial.
-------------------------------
Gabriel Slomka
Ziden
 
Posts: 11
Joined: Wed Aug 24, 2011 3:58 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Skripi » Wed Aug 24, 2011 7:11 pm

Hey dude, so are you right clicking your test project and configuring build path for that?
Please rush me my portable walrus cleaning kit. Yes I am over 18 but my IQ isn't.
Skripi
 
Posts: 61
Joined: Wed Aug 11, 2010 5:35 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Ziden » Wed Aug 24, 2011 7:32 pm

Test build path pointing to the AndEngine source, isnt that correct ?

a jar was way easyer
-------------------------------
Gabriel Slomka
Ziden
 
Posts: 11
Joined: Wed Aug 24, 2011 3:58 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Akirasan » Thu Aug 25, 2011 3:08 am

I tried the tutorial above on an existing project and all andEngine references were renamed!

Something like:
import org.anddev.andengine.engine.Engine;
import org.anddev.andengine.engine.camera.Camera;
import org.anddev.andengine.engine.options.EngineOptions;

got changed to:
import src.org.anddev.andengine.engine.Engine;
import src.org.anddev.andengine.engine.camera.Camera;
import src.org.anddev.andengine.engine.options.EngineOptions;

Notice the "scr" at the beginning.

Even the andEngine linked dir does not compile beacuse of the same errors!
Akirasan
 
Posts: 13
Joined: Tue Feb 08, 2011 6:33 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Skripi » Thu Aug 25, 2011 4:43 am

Sorry for the confusion guys, as soon as I get out of this lecture ill post pictures with the tutorial
Please rush me my portable walrus cleaning kit. Yes I am over 18 but my IQ isn't.
Skripi
 
Posts: 61
Joined: Wed Aug 11, 2010 5:35 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Skripi » Thu Aug 25, 2011 5:31 am

Alright guys, I added some pics to ensure that you weren't misreading the instructions. If you still have problems let me know =D
Please rush me my portable walrus cleaning kit. Yes I am over 18 but my IQ isn't.
Skripi
 
Posts: 61
Joined: Wed Aug 11, 2010 5:35 pm

Re: [TUTORIAL] To Everyone Looking For .jar Files

Postby Skripi » Thu Aug 25, 2011 5:32 am

Akirasan wrote:I tried the tutorial above on an existing project and all andEngine references were renamed!

Something like:
import org.anddev.andengine.engine.Engine;
import org.anddev.andengine.engine.camera.Camera;
import org.anddev.andengine.engine.options.EngineOptions;

got changed to:
import src.org.anddev.andengine.engine.Engine;
import src.org.anddev.andengine.engine.camera.Camera;
import src.org.anddev.andengine.engine.options.EngineOptions;

Notice the "scr" at the beginning.

Even the andEngine linked dir does not compile beacuse of the same errors!



I believe this is cause you linked the AndEngine project and not the src folder within the project. make sure you only link the src folder not the entire project
Please rush me my portable walrus cleaning kit. Yes I am over 18 but my IQ isn't.
Skripi
 
Posts: 61
Joined: Wed Aug 11, 2010 5:35 pm

Next

Return to Tutorials

Who is online

Users browsing this forum: Alexa [Bot] and 33 guests