I have tried to get Rajawali 3D engine work with Android Studio. After some searching on Google with no success, I have realized that I'll have to do it myself.
- Installed latest version of Android Studio
The hard way
- Go to GitHub page of Rajawali 3D engine source (https://github.com/MasDennis/Rajawali)
- Click Download ZIP button and save it to your computer
- Unzip it to Rajawali folder (let say c:\temp\Rajawali) go to that folder and you should see this
- Start Android Studio and select File -> New project and create new blank project (see image below)
- Go to forder where project was created (for this example it is c:\temp\MyApplication2\)
- You should see structure like this
Now copy folder gradle
and files gradlew.bat, build.gradle and local.properties to folder c:\temp\Rajawali
Copy and paste thext below to gradle.build
apply plugin: 'android-library'
java.srcDirs = ['src']
res.srcDirs = ['res']
Run Android Studio again and select Import project. Navigate to c:\temp\Rajawali and select build.gradle file.
Click Sync Project With Gradle Files
Open Command prompt and navigate to c:\temp\Rajawali
Type gradlew build
If everything was done right project should compile and you'll get new build folder. There is folder called libs inside that contains Rajawali.aar library.
You can now install Rajawali.aar library to your local maven repository like this:
mvn install:install-file -Dfile=.\build\libs\Rajawali.aar -DgroupId=rajawali.framework -DartifactId=rajawaliframework -Dversion=1 -Dpackaging=aar
Now you can put maven reference to jour local Rajawali into build.gradle file of your project
Build your project.
The easy way
If you find this tutorial useful please share it with your friends.