Libgdx Crashes upon execution. No error messages - java

I create my project using the LibGDX setup tool and import it using eclipses, but when I test the project, without making any modifications, No windows pop up, and the program terminates.
I've tried both importing it as a Gradle and as a project.
I had the project working 1 week ago, but I cannot seem to get the project to run anymore.
Previous versions of LibGDX and Eclipse dont work either

Not sure if this will help you or not:
When you create your libGDX project, create it in folder that is NOT within the workspace folder you wish to use for Eclipse - that can cause quite a lot of unexpected results.
A basic setup as follows has always worked for me, first time, every time:
C:\MyProjects\MyLibGdxProject\libGDX <- Target folder for libGDX (not within Workspace)
C:\MyProjects\MyLibGdxProject\workspace <- Workspace for Eclipse

Related

Android java class/symbol not found despite being placed in the same directory

I have encountered issues in my android studio regarding java classes/symbols not found, despite these classes and symbols being placed in the same directory, or under the same parent directory. I am making use of the DJI's mobile SDK for android.
Example of errors:
Cannot resolve symbol 'DJISampleApplication'
For illustration, here are 2 screenshots
First example. Clicking on "import class" causes android studio to create a brand new class instead of linking it to the existing one.
second example
However, oddly, when I go under "Build >> Make Project" , or "Run" to deploy on a real android device, the app can be installed, and there are no errors (only warnings).
Things I have tried:
Uninstalling and re-installing android studio
copying the whole project from the original files in again
Trying on another computer, which works. However, as i am only assigned this pc, i have to get this to work here as well.
Thank you in advance !
Your best bet is to invalidate caches and restart. Solves 99% of problems like this for me.
You can also try to reimport the project using the gradle tool window ...
Click the reload button here ...

Unable to config and run a Java project in IntelliJ

Me and a few other students are building a game with Java at university. Someone else setup the basic structure for the project and i pulled the repo and tried to run it.
When i run it i get
this window
When i open the config, i am unable to add the main class, it is located in the file shown in the image. The OK button is disabled. You can see that here.
I'm running the latest version of IntelliJ, JDK 9 and Windows 10. The project in question is built with LibGDX. The full repo and folder structure can be seen here.
I am able to setup my own project and run my own apps, i just can't run this specific project.
Please help.
I think, since you have no "Java" directory, Intellij does not recognize any folder as Java Sources. You'll have to do that manually by rightclicking and mark the desired directory as Source root.
I figured out what the problem was, and of course - it was obvious. The project was setup with an old version of Gradle (2.4) and i was running Java 9. I installed Java 8 and made the project run.
The OK button was disabled because the project hadn't built properly (i though it had) so it couldn't find the class i needed to run it.

Eclipse keeps building workspace

I'm using Eclipse Mars 4.5.0 IDE, and developing ColdFusion applications using CFEclipse plugin. Also, I have SVN Subversion and FileSync plugins.
The company, which I work, has a huge repository. I synchronized all files to the my own workspace and when I do any changes in Eclipse it should update my own workspace and development folder in our server.
It works fine, but sometimes, let's say once a week it starts to build workspace automatically. As I said workspace is huge, so it takes forever.
I cannot do any changes while it was building. Actually I can change the codes but I cannot save the file, saving task is just waiting to build workspace. When I cancel the building task, then try to save the code, before saving building workspace start again.
It's really annoying. I cannot do any work, I have to leave my computer at the work, when I came next morning building is done, and I can start to work. I tried everything to get ride of it, none of them worked.
Also project build automatically is unchecked. But when I do chances in the code, I have to build project not the workspace to sync the code to the development. But of course it builds all workspace not just project.
Interesting thing is that it is not happening all the time. Sometime it works fine, sometime not. For example, yesterday, I just copied one folder from one project to another one, and tried to build project, but Eclipse build whole workspace. I don't know what to do?
EDIT: Screenshot is added.
Have you tried unchecking build automatically in
Window/preferences/general/workspace?
EDIT:
similar question has been asked before on SO.
The answer was (as far as I can understand) to make jar-s out of projects that you use but don't want to compile them every time.
Make sure you have unchecked the option Build Automatically under the Project menu.

Eclipse libGDX can't run as Android Application

I have a libGDX project in Eclipse which of course uses Gradle. When I try to run the AndroidLauncher, I don't get an option to run it as an Android Project. I only get two options which are Gradle Build and Gradle Build... (Same thing with "..."). The odd thing is that if I first right click on the AndroidLauncher.java and click anything and try to run the project, then it works. It works until I change the core code class. Then it only has the same two options again. How can I solve this and always run it as an Android Project.
Rather than running the AndroidLauncher.java, running the project folder solved the problem. It now always runs as an Android Project.

Errors in Android NDK Project in Eclipse IDE after Importing

I created a project that utilizes the Android NDK. It works fine in the workspace I first created it in. However if I try to import the project into a different workspace I can no longer view let alone edit any of the JNI files. The minute I open a file under the JNI folder the project stops compiling and running. Note, this occurs even without saving the file just simply opening it. This can be fixed by removing the project from the workspace and reimporting it.
This is a large hindrance if I want to have any one else work with the JNI code. They can change the Java code without issues.
IS this some weird bug with project set up, or simply a bug in the Eclipse NDK plugin?

Categories