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.
Related
INTRODUCTION:
I exported android project from Unity version 4.6.1f1. After that, I imported it in Android Studio. I worked on a project for a few days and everything worked as supposed to.
When I change something in Unity, I just export android project again. In android studio, I delete ASSETS folder and then paste the new one that I get from Unity export. I did this in Eclipse to update my project. I am doing it now and everything works just fine.
PROBLEM PART:
Then, I updated Unity to version 4.6.2p2. I exported android project again. I changed ASSETS folder as usual. I also changed unity-classes.jar. I used this method in Eclipse before and it worked for me (apparently it worked for a lot of people, as my research on the internet confirmed it).
This does not work in Android Studio. I get error
Invalid serialized file version. Expected version: 4.6.2p2. Actual version: 4.6.1f1.
I tried: restarting Android Studio; cleaning and rebuilding project; syncing gradle; using other versions of Unity,... I also tried removing all dependencies, cleaning project, then adding dependencies again and rebuilding project.
I did not find any reference to this problem on the internet.
The only solution I get so far is to import project in Android Studio as new one and then do all the work again. But that is very undesirable.
Did anyone has this problem and come up with a solution that will not require making new project from scratch?
I did more research and here is the solution.
The problem is that Unity doesn't export all libraries together now. Specifically, libmain.so libmono.so and libunity.so are now separated and you need to change them also after you export project with new version of Unity (changing unity-classes.jar and assets folder is mandatory as before).
When you export project from Unity, you can find those libraries in libs/armeabi-v7a folder. In Android Studio, you can find them in src/main/jniLibs/armeabi-v7a folder.
I'm a newbie to bitbucket and android. I create a repository on bitbucket and clone it into my computer, then I commit my android project and push it to remote repository, then I close eclipse.
After reopening my android project, I found that the folder (build path) with the named Android Private Libraries and Android Dependencies were lose away (that's mean lose reference libraries), that cause my project many errors.
How can I build path to reference to necessary libraries?
More over, I also found that all the libraries before always reference to the project with the named appcompat_v7 in the eclipse workspace.
I'm not so sure it would work correctly if I clone my project from another computer.
Please help me to work correctly between android eclipse with bitbucket
Once you restart your eclipse if you do a project clean and build it again your dependencies should be fine.
app_compat won't give you errors as long as you have all the API levels that are required by you application.
Make sure to update your sdk
could not find PdCore.apk error when compiling.
I've followed instructions from:
http://createdigitalnoise.com/discussion/1415/eclipse-could-not-find-pdcore-apk
and here:
https://github.com/libpd/libpd/issues/22
I've got all the SDK's of android.
The problem as said in the first link relates to eclipse trying to manage the git project when it should be used only with the command line interface. Egit does this just when you import the project to eclipse.
To prevent egit to update the project and loose the .apk what I did was to copy all the git content to a folder without the hidden git folder that tells eclipse that that is a git project.
Eclipse imported it as a normal project (without git) and I could be able to run the library.
Hope this will be useful to others.
I am a fan of Maven and love the freedom it gives me and my fellow programmers when collaborating on a project. I consider myself to have a fairly good understanding of Maven and its pom as well as the command line goals.
Now we are starting to create an android test project to test our Android software in an automatic way. We have no problems doing this from within the eclipse environment and the test suite is now up and running.
However, its time to include more programmers into this project and therefore we want to be able to clone this project from our git repository, run mvn eclipse:eclipse, import it into a fresh eclipse (of course with android-sdk and what not) and run the tests as is expected.
We stumble over the hurdle that the project doesn't become an Android Test Project within eclipse thus it is not possible to run Android JUnit on any of its classes.
The main question: How do we make the project become an Android Test Project from the terminal window after it has been cloned from Git?
You can manually add android nature to the project by adding it in the .project file and then opening eclipse again.
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
You can create an empty android test project, and then compare it's .project file with your project's.
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.