libgdx Gradle Project Import Error - java

I am new to libgdx and i followed everything that the tutorial says. I have also added
-Dosgi.configuration.area.default=null
-Dosgi.user.area.default=null
-Dosgi.user.area=#user.dir
to my eclipse.ini file. The error I get is(cannot post image becoz reputation is less than 10) :
null
see error log for details
I have eclipse version 4.1(Juno)
Please Help. I am very exited to develop 2d games. Any help would be appreciated.
Thanks in advance.

Related

Can't draw a overlap2d scene

I'm starting with libGDX and overlap2d, I'm following this tutorial: Runtime Quick Start - Overlap2D setup tutorial. I did everything like the video shows, but when I try to run it, some red lines appear. I don't have any idea about what I could do to solve. Can any one help me?
Here's my console:
Here's my Main class:
Hers my GameStage class:
project.dt:
{"pixelToWorld":3,"originalResolution":{"name":"orig","width":1920,"height":1200},"scenes":[{"sceneName":"MainScene","physicsPropertiesVO":{}}]}
MainScene.dt:
{"sceneName":"MainScene","composite":{"sImages":[{"uniqueId":3,"tags":[],"x":-7.666664,"y":-13,"originX":85.333336,"originY":85.333336,"layerName":"Default","imageName":"chao"},{"uniqueId":4,"tags":[],"x":159.33334,"y":-10.333336,"originX":85.333336,"originY":85.333336,"zIndex":1,"layerName":"Default","imageName":"chao"},{"uniqueId":5,"tags":[],"x":-7.3333282,"y":157.66666,"originX":85.333336,"originY":85.333336,"zIndex":2,"layerName":"Default","imageName":"chao"},{"uniqueId":6,"tags":[],"x":159.33333,"y":158.66667,"originX":85.333336,"originY":85.333336,"zIndex":3,"layerName":"Default","imageName":"chao"}],"layers":[{"layerName":"Default","isVisible":true}]},"lightSystemEnabled":true,"ambientColor":[0,0,0,1],"physicsPropertiesVO":{}}
Does anyone have any idea how can I solve it?
Thank you
The thing is that method loadScene(MainScene.dt) is looking for a pixelToWorld field but there is no pixelToWorld in your MainScene.dt file.
Possible reason may be Overlap2d Editor and overlap2d-runtime version incompatibility.

"Cannot resolve corresponding JNI function"

I am trying to compile this project (https://github.com/dennisss/mvision/tree/master/android) which is a success after changing minSdkVersion to 22.
However, the app only displays a black screen after running it. When I look deeper into the code, I can find several lines where the error "Cannot resolve corresponding JNI function" is displayed. (such as in /mvision-master/android/app/src/main/java/me/denniss/mvision/RecordingFragment, line 61)
I tried to solve the problem using answers on similar issues that I found but it didn't work, does anyone has an idea on how to fix this?
any help would be greatly appreciated! Thank you!

Android class not found NoClassDefFoundError

I need your help to resolve a class problem. When I run my virtual device, and when I click on button to call a method, that doesn't work.
I tryed with different libraries like itext and justformPDF (last one is java libraries).
I indicated it in build path but I have a mistake ... The class is not found :(
Thanks for your help :)
You can see the logcat here : www.aclebpokerclub.com/Application/LogCat.png

R cannot be resolved to a variable, usual fix doesn't seem to work

I am trying to compile my android app that I am crating by following the google tutorial at https://developer.android.com/training/index.html
I have run into a problem where I get the error "R cannot be resolved to a variable"
I followed the suggestions from the other threads such as cleaning/rebuiding, removing all import android.R, and reinstalling my Android SDK Build-tools for every version
Here is a copy of the tutorial project with the issue MyFirstApp.zip
I have taken the suggestions found in other threads, but their solutions have been unsuccessful.1 2 3 4 Please help!
Please let me know if there is any other information you need to fix this issue.
I have seen your code there is an error inside main_activity_actions.xml which is inside your menu folder
It does not find #string/action_search which must be present in strings.xml
So put <string name="action_search">Search here</string> inside your strings.xml
and clean and build the project.
I hope the error will be solved.
It usually append when you have an error with your XML file.
Maybe you try to use an XML variable who doesn't exist anymore. It will not give you any error on your XML.
Verify your XML variable on your file 'Value' and which you call from your Java file

Eclipse shows multiple errors in Physics Box2D extension

I am following a tutorial and developing an Android game using AndEngine and Physics Box2D Extension. In a while I found out that there was a problem with (eclipse or) Physics Box2D Extension. Eclipse shows multiple errors in following
Package: org.andengine.extension.physics.box2d
Classes:
FixedStepPhysicsWorld.java
PhysicsConnector.java
PhysicsConnectorManager.java
PhysicsFactory.java
PhysicsWorld.java
Example errors:
The hierarchy of the type FixedStepPhysicsWorld is inconsistent, The import org.andengine.engine cannot be resolved
Package: org.andengine.extension.physics.box2d.util
Class: Vector2Pool.java
Example errors:
The import org.andengine.util cannot be resolved, GenericPool cannot be resolved to a type
I tried to post some screenshots to make the case more clear but I can't. Thanks in advance.
I had these error a lot of times.
you should check that you use same andengine version for the extension(GLES1.0,GLES 2.0 or GLES 2.0 AC).
2.If you do have same version, delete all of them from eclipse and try to import them back and than clean them.
Hope it works.

Categories

Resources