Libgdx project import build path error - android

I would just want to ask how to copy a libgdx project to another computer. I pushed the libgdx project at bitbucket but when I cloned it to another computer and import it with eclipse I am having lots of dependency/build path errors. Upon inspecting, the original project has multiple jars added on the build path from
/Users/me/.gradle/caches
. Maybe copying all of these jars to the other computer would solve the problem but that would be a tedious process. How can I properly fix these errors? The project was initially created by libgdx setup with Generates Eclipse Project Files checked. Thank you very much!

When you clone your repository to another computer, you must refresh the dependencies.
In eclipse this is done like this:
Select all your projects.
Right click one of them.
Do:
Gradle -> Refresh All.

Related

How does one migrate libGDX projects to another system?

I have libGDX projects on one laptop. I need to move to another laptop. I am using eclipse on both windows laptops. I have a git repo I can push to and pull from. I know that I can clone the https://github.com/libgdx/libgdx-demo-cuboc and import it into eclipse as a gradle project. But when I try this with my libGDX projects the "Build Model" fails.
I suspect I did not export the project correctly from my source laptop.
Can someone please point out what I am doing wrong?
Update:
OK. When I exported the projects from Eclipse I exported as plain old Android projects (Export Android Application), so I figured that I should export the project as Generate Gradle build files but I get this error when I attempt to do so ...
... and yes I did this too ...
... and I still get the same error.
UPDATE: After accepting JH's answer. Thank you for your answer BTW.
I was able to copy files in the project, but with gradle one copies the files into the directory libGDX generated the base project. I was coping the files into my Eclipse workspace, which is why the files were not showing up in my Eclipse project ... I know confusing huh. Well I was able to get my project to build but whenever I launched the app if crashed at runtime (see java.lang.UnsatisfiedLinkError: Native method not found: com.badlogic.gdx.backends.android.AndroidGL20.glGenTexture:()) I decided to give up on Eclipse and migrate my project to Android Studio. After taking a quick look at the Android Studio I was FINALLY able to build my app and execute it without runtime errors on my new laptop!
For clarity here is what I did to migrate my project from one laptop to another.
1) I got the my code out my git repo.
2) I downloaded the latest gdx-setup.jar, 1.5.3, from the libgdx project.
3) I generated a project, being careful to use the correct values for: Name, Package, Game class and Android SDK. For Destination I used c:\Users\Me\.
4) I copied the directories android, core, html, desktop and ios directories from my git repo into the corresponding directories in the project that gdx-setup.jar created.
5) Then I started Android Studio and follow the directions found here: Migrating to Android Studio
6) updated my build.gradle to include google play service and BANG! it worked
You shouldn't have to export anything, just clone the git repository on the new computer and then import gradle project and build model.
You could even generate a new libgdx project with their project wizard and then copy the source files.

how to share an android project with sourcetree and eclipse

I'm having a lot of problems with sharing a android project using sourcetree and eclipse.
I have tried the following:
- First importing the git from sourcetree and afterwards importing this in eclipse
- Creating empty project in eclipse and then try to import to it throught git/sourcetree.
It seems like no matter how I try to do it, it doesn't do it right. Some of the attempts, I have duplicated projects (which is created by eclipse twice, I dont know why)
Anyway, can anyone give an explanation on how to import a project from git so that I can see the changes in eclipse and push/pull/commit in the source tree?
Any help will be greatly appreciated.
Just clone your project with sourcetree on your Desktop (e.g) then add your project to Eclipse
Right click on the Package Explorer -> Import -> in Android -> "Existing Android Code Into Workspace" -> Select your folder project then click Finish.
You can also copy the project to your workspace by selecting the checkbox.
I zip the project folder.
I then extract it on another computer and import the project in Eclipse again...
Easy, isn't it?

Import maven project into Eclipse/Android project

I downloaded the Megamatcher Android SDK from http://www.neurotechnology.com/megamatcher.html
I already implementend a face identifier on android devices
now i want compare the performance of my identifier with a corporate one (the one above)
My problem is to export the mvn project from Megamatcher tutorial into an android project under Eclipse.
there's a way to create an eclipse project from a maven one? including all remote and local dependencies??
Thanks
Maybe it's just this what you are looking for
From: source:
If you have a simple java project which is made up of only one module,
using eclipse is very simple. To generate the eclipse project files
from your POM you execute the following command:
mvn eclipse:eclipse
If you have created or checked out the project with eclipse, you only
have to refresh the project in your workspace. Otherwise you have to
import the project into your eclipse workspace (From the menu bar,
select File >Import >Existing Projects into Workspace). In the latter
case the project (directory) should not be located in your workspace,
because eclipse might come into trouble, especially if you want to use
eclipse as the scm client.

Adding an android test project to current android project in SVN

As the title implies I have an android project in a repository that I want to add an android test project to. I would like to have both these two projects in my repository so they can be in sync and I only have to update one of the projects to update them both. I can't seem to figure out how to do it though. Is it possible? And if so, how can it be done?
Thank you in advance!
For your test project, do the following in Eclipse: Team > Share project > SVN.
And follow Tim's advice on how to import the project into eclipse.
See the following:
Creating an Android Test project in Eclipse
If you upload to SVN in Eclipse (by syncing the MyAndroidApp project, not the MyAndroidAppTest project) you need to do a little more (I've just done it now). So when you update your other working copy it will pull down the /tests directory. The MyAndroidAppTest project does not automatically show up in the Package Explorer. So you need to go to File.. Import...Existing Projects into Workspace.... Then select the root directory by browsing to your /MyAndroidApp/tests directory and click Finish.
By: Tim

Importing Android Project

We have a SVN set up across many developers. i am trying to import the project into Eclipse and i am getting the following error
http://variable3.com/files/screenshots/2011-02-22_1255.png
You might want to change your workspace and then import the file into eclipse? You can do this by going to File > Switch Workspace.
Here's a good way to directly link SVN and eclipse
http://www.ibm.com/developerworks/opensource/library/os-ecl-subversion/
Essentially, it shows you how to install subclipse and checkout projects directly into your workspace. It might help you avoid these issues in the future.
There is a solution:
-right click on Project Explorer
-Import...
-General->Existings project into workspace
-Browse your project
-Set checkbox "Copy projects into workspace"
-Finish

Categories

Resources