simon-heinen / droidar

DroidAR Mobile Locationbased Augmented Reality Framework for Android
GNU General Public License v3.0
225 stars 275 forks source link

Android Studio #33

Open gautamverma opened 7 years ago

gautamverma commented 7 years ago

Hi ,

How to import this library in Android Studio. I have tried to clone the code and manually the add the gradle files. However it giving a lot of error of classes not able to find.

import geo.GeoObj; import gl.Color; import gl.CustomGLSurfaceView; import gl.GL1Renderer; import gl.GLCamera; import gl.GLFactory; import gl.scenegraph.MeshComponent; import gl.scenegraph.Shape; import gui.GuiSetup; import gui.InfoScreenSettings; import system.ErrorHandler; import system.EventManager; import system.Setup; import util.Vec; import worldData.Obj; import worldData.SystemUpdater; import worldData.World; import actions.Action; import actions.ActionCalcRelativePos; import actions.ActionMoveCameraBuffered; import actions.ActionRotateCameraBuffered;

I have tried adding the prefix de.rwth too but it didn't worked out. Its also giving errors in de.rwth.setups.CollectItemsSetup Class. Any body can help me out?.

armandopadilla commented 7 years ago

It all depends on what you're goal is. To import the droidar library youll have to import it as a module.

Steps. Android Studio 2.2

  1. create your AR application. File -> New Project -> go through the process.
  2. Then add in the module by doing. File -> New Module -> Select "Import Eclispe ADT Project" -> Select the Location to the droidar folder -> Click Next until you reach Finish.
  3. Once the the module is shown in your Project Android View. Click on it then go to Build -> Clean Project. You should be good. If not resolve your issues and then once thats done Build the module under Build -> "Make Module droidar"
  4. Click on your app. Click on File -> Project Structure -> Under "Modules" (left hand side) click on app. Then click on "Dependencies", then click on the "+" in the lower left hand corner, then click on "Module dependency". Click on OK.
  5. Clean your app project
  6. WIN! You're done.