-
Notifications
You must be signed in to change notification settings - Fork 0
Importing Rajawali and RajawaliExamples
This is a quick guide on how to import Rajawali
and RajawaliExamples
for the first time.
For this process I am assuming that you have already taken the necessary first steps of getting Eclipse for Android up and running. If you have not done that yet head over to our friends Google and pick up the bundle.
You should also set up a GitHub account, and I highly recommend using the GitHub application (links in the footer of this page) for managing your repositories. Once you have gotten this far you are ready to start working with Rajawali.
The first step is to make a local copy of the Rajawali
and RajawaliExamples
projects. There are two easy ways in GitHub to do this. You can either download a ZIP archive of the project, or you can clone the project.
I like cloning because it uses the GitHub application, and has an option for instantly synchronizing your local copy with the remote repo. This is a fast and easy way to get the latest updates that are pushed.
You can download or clone the projects from their main repository pages:
Whether you choose to clone or download, you probably will want to use one of the release tags. The master
branch of both the library and examples is used for development and should be considered unstable for production code. When we release a stable version, it will be tagged. If you are cloning, you can simply checkout a tag. If you are downloading a copy, you can find the tag zips here:
[Rajawali Tags] (https://github.com/MasDennis/Rajawali/tags)
With a copy of each project on your local drive you can now import these projects into Eclipse.
Launch Eclipse and create a workspace if you don't already have one. I won't go into the details about using Eclipse, but your workspace is a collection of folders that contain your projects. You can make your worksapce and local Git repository the same folder for easy version control.
- To import a project click the
File
menu and selectImport...
- In the
Import
window expandGeneral
and selectExisting Projects into Workspace
- Select the
root directory
by clickingBrowse
- Locate and select the Rajawali folder
- Select
Copy projects into Workspace
(optional) - Click
Finish
After a short time the project will be copied and imported. Repeat the above steps for RajawaliExamples
Upon initial import of RajawaliExamples
you may find that Eclipse produces a few errors. This is caused by the linkage between the Rajawali
library and the examples project being severed. You have to re-establish this connection before RajawaliExamples
will compile.
First, ensure that Rajawali
is flagged as a "library" in Properties
- Select
Rajawali
in the Package Explorer view - Click the
Project
menu, and selectProperties
- In the Project Properties window click
Android
in the left navigation column - Tick the
is Library
box if it is not already - Click
Apply
- Then click
OK
Second, restore the linkage from Rajawali
to RajawaliExamples
in Properties
- Select
RajawaliExamples
in the Package Explorer view - Click the
Project
menu, and selectProperties
- In the Project Properties window click
Android
in the left navigation column - Select the broken
Rajawali
library link at the bottom of the window, indicated with a red X - Click the
Remove
button to delete the old library link - Click
Apply
-- This is critically important because Eclipse is stupid. - Click the
Add...
button and select Rajawali from the pop-up - Click
Apply
again - Then click
OK
In most cases this will resolve all current build problems. If some remain there are a couple steps to try before throwing in the towel and asking for support.
Clean the projects individually Sometimes cleaning "all" won't do the trick.
- Click
Project
menu, selectClean...
- Choose
Clean projects selected below
- Select your project
- Click
OK
- Repeat for each project
Restart Eclipse
Simply shutting down the program and reopening your workspace will clear the errors. This is what I have to do almost every time.
At this point you will see a whole list of "warnings" in Eclipse. You can ignore these are they are regarding deprecated functions that will cause no harm, but are there to enable legacy support.