Andengine installation in eclipse
In this post I will show you how to install or import andengine library in eclipse.
Assumption - This tutorial assumes that you have downloaded and installed eclipse, Java, JRE in your system and you have fully working ecplise IDE, but not to worry if you haven't done it yet, you can find guide about this at this link here - Android Development Environment Setup
Step 1:
Andengine is being hosted and updated on Git Hub. Eclipse has inbuilt Git tool to import libraries or any other project stuffs. Let us first check if you have this functionality already (If you are using old eclipse version)
i. Open eclipse, right click anywhere on open space inside Project Explorer view at left side of the screen.
ii. Click on Import option.
iii. Check if you can see the Git folder,
if not then follow below steps.
i. Select the Help tab of Eclipse’s menu, and click on Install New Software.
ii. Within the “Work with:” input field type this or copy paste
“http://download.eclipse.org/egit/updates” then click Add….
iii. Click both of the checkboxes for “Eclipse Git Team Provider” and “JGit” and then install.
Step 2:
Copy this URL - https://github.com/nicolasgramlich/AndEngine.git
Now go back to eclipse in the Project Explorer section. Right click within the area, click on Import option.
Expand the Git folder and select Projects from Git and click Next.
Click on URI option and click Next
Now the URL we have copied above should appear in the URI section here if not then do as below,
Paste “https://github.com/nicolasgramlich/AndEngine.git” within the URI section.
Type “github.com” in the “Host” section.
Type “/nicolasgramlich/AndEngine.git” in the “Repository path” section.
Click Next and Next again in the window. Just Make sure GLES2 is selected by default(or select yourself).
After all you can click on Next button for rest of the screens and finish this thing.
Step 3:
Now you should see lots of errors have appeared in andengine imported library. Do not worry about it we gonna fix it in 0 time.
i. Expand the andengine library and make sure res folder is there if not the right click on library and select New folder, give name as res and click Ok.
ii. Now right click on AndEngine library and select Properties (Alt + Enter on windows). select Java Compiler. Check the box Enable project specific settings and in the drop down options of Compiler compliance level select “1.6″. Click apply button. Within the properties window, select the option “Android” and make sure our Project Build Target is set to “Android 4.0″. Also make sure the Is Library checkbox is checked and apply the changes.
iii. Finally, select the Java Build Path properties and then go to the Order and Export tab, and make sure all of the checkboxes are checked. Click on Apply button and close the “Properties” window now.
Step 4:
BRAVO!!!
We have successfully imported the AndEngine library in eclipse. If still there are some errors in the library try to clean the project. Do as below,
i. Click on Project in the main menu toolbar.
ii. Select option Clean...
iii. Select the AndEngine library and hit Ok.
In the Next post we will start coding our actual game. Any questions or comments are welcome.
In this post I will show you how to install or import andengine library in eclipse.
Assumption - This tutorial assumes that you have downloaded and installed eclipse, Java, JRE in your system and you have fully working ecplise IDE, but not to worry if you haven't done it yet, you can find guide about this at this link here - Android Development Environment Setup
Step 1:
Andengine is being hosted and updated on Git Hub. Eclipse has inbuilt Git tool to import libraries or any other project stuffs. Let us first check if you have this functionality already (If you are using old eclipse version)
i. Open eclipse, right click anywhere on open space inside Project Explorer view at left side of the screen.
ii. Click on Import option.
iii. Check if you can see the Git folder,
if not then follow below steps.
i. Select the Help tab of Eclipse’s menu, and click on Install New Software.
ii. Within the “Work with:” input field type this or copy paste
“http://download.eclipse.org/egit/updates” then click Add….
iii. Click both of the checkboxes for “Eclipse Git Team Provider” and “JGit” and then install.
Step 2:
Copy this URL - https://github.com/nicolasgramlich/AndEngine.git
Now go back to eclipse in the Project Explorer section. Right click within the area, click on Import option.
Expand the Git folder and select Projects from Git and click Next.
Click on URI option and click Next
Now the URL we have copied above should appear in the URI section here if not then do as below,
Paste “https://github.com/nicolasgramlich/AndEngine.git” within the URI section.
Type “github.com” in the “Host” section.
Type “/nicolasgramlich/AndEngine.git” in the “Repository path” section.
Click Next and Next again in the window. Just Make sure GLES2 is selected by default(or select yourself).
After all you can click on Next button for rest of the screens and finish this thing.
Step 3:
Now you should see lots of errors have appeared in andengine imported library. Do not worry about it we gonna fix it in 0 time.
i. Expand the andengine library and make sure res folder is there if not the right click on library and select New folder, give name as res and click Ok.
ii. Now right click on AndEngine library and select Properties (Alt + Enter on windows). select Java Compiler. Check the box Enable project specific settings and in the drop down options of Compiler compliance level select “1.6″. Click apply button. Within the properties window, select the option “Android” and make sure our Project Build Target is set to “Android 4.0″. Also make sure the Is Library checkbox is checked and apply the changes.
iii. Finally, select the Java Build Path properties and then go to the Order and Export tab, and make sure all of the checkboxes are checked. Click on Apply button and close the “Properties” window now.
Step 4:
BRAVO!!!
We have successfully imported the AndEngine library in eclipse. If still there are some errors in the library try to clean the project. Do as below,
i. Click on Project in the main menu toolbar.
ii. Select option Clean...
iii. Select the AndEngine library and hit Ok.
In the Next post we will start coding our actual game. Any questions or comments are welcome.
No comments:
Post a Comment