Comments (15)
From [email protected] on June 05, 2010 13:44:39
Also, I dont have any trouble on the android platform. Able to create world and call
world.step and it doesn't ForceClose. I was having a similar problem running the box2d
gdx-test on windows 7 in eclipse, but running the test in android worked just fine.
from libgdx.
From tonyo%[email protected] on June 06, 2010 13:46:54
Means that it either cannot find the library that houses
"com.badlogic.gdx.box2d.World.newWorld". Are you sure you've added the correct
libraries to the project and that the compiler is able to find them?
It may not exist or have been moved for v0.5. The readmes appear to be for 0.4 and
it took a bit of hacking around and guessing for me to find some of the 3D features
(NOT THAT I'M COMPLAINING, I DIDN'T HAVE TO REINVENT THE WHEEL AND FOR THIS I AM
THANKFUL!).
from libgdx.
From [email protected] on June 06, 2010 13:53:11
well when i remove the vm arg from run config it simply complains that gdx isn't
available when it calls System.LoadLibrary so I can only guess I am doing this
correctly. I've been using box2d via libgdx extensively since friday evening
successfully on my android phone though and I dont know hardly anything about whats
going on but I can only assume that its finding the .so just fine.
Both the .so and .dll are there in the same directory.
the README is outdated and had some typos. I had to make edits to make it functional.
And like I've been saying, after those simple edits (bus hell, ive only been using
java since friday), it ran fine on the Android emu and on my phone. Just not the
desktop.
from libgdx.
From tonyo%[email protected] on June 06, 2010 23:51:58
I don't write in Java either..I've been writing in C and CPP for about 15 years and
recently just in Java for Android and C# out of curiosity.
That error does mean, though, that it isn't finding a referenced library. I couldn't
tell you or help without seeing the project set up.
Could also be "Thrown if the Java Virtual Machine cannot find an appropriate
native-language definition of a method declared native." How is your JVM being set up?
from libgdx.
From [email protected] on June 07, 2010 07:37:27
So I'm confused, is Box2D working for you with 0.5 running as a Desktop App? As for
the jvm, Just a sun java 1.6.0_20 with the libraries setup to point to gdx and
backend-desktop and backend-dependancies. Run-config setup so its finding the libs.
32-bit computer.
The one guess I can take a stab at is that, looking up JNI stuff, seems like its
common to have two dll's involved. The JNI wrapper and the actually library dll. I
dont know if thats the case here, it would make sense that it loads the JNI wrapper
from the gdx.dll just fine since LoadLibrary doesn't fail. But then the second dll?
Well all I have here is a libgdx.so file. Maybe i need a libgdx.dll file for windows?
I dont know alot about it all.
I'd mess around with it some more but ive completely migrated to just developing on
my android phone via eclipse. I was having some slow-downs from the immediate-
renderer and considering the simplicity of what I'm working on and the fact that I'm
porting something already mostly written, I just ended up ditching the majority of
libgdx and making use of the jni-box2d wrapper which works great so far on android.
from libgdx.
From badlogicgames on June 09, 2010 09:43:40
This is indeed strange. I always test the binaries i send out. To clear up some things: at the moment all the shared libs get compiled to a single shared lib called libgdx.dll/so. This includes the Box2D code which is actually a problem given the license of Box2D afair. This will probably change in the future i just didn't have the time to fix it yet.
As stated in the comments in the source of the Box2D example the ImmediateModeRenderer is not to be used in production due to it's slowness. It's merely a tool for me to get something close to OpenGL immediate mode for debugging purposes.
I'll check the thing tomorrow.
Status: Accepted
from libgdx.
From badlogicgames on June 11, 2010 06:33:29
Zip file on download page contained the wrong dll. Fixed with 0.51 release.
Status: Fixed
from libgdx.
From [email protected] on March 22, 2011 22:48:27
I've got the same exception today with libgdx 0.9,
and found the cause is initializing World in static initialization block.
It is solved after I moved "new World()" into a constructor.
from libgdx.
From [email protected] on March 23, 2011 11:14:38
konya, could I get a bit more clarification? I'm seeing this same issue in my app and don't quite understand what you mean. I'm running libgdx .9 in ubuntu.
from libgdx.
From [email protected] on March 27, 2011 01:02:21
If you initialized the world like:
public class A {
World world = new World(...);
...
}
Just move the initialization into a method or constructor:
public class A {
World world;
public void reset() {
world = new World(...);
}
}
This is how I solved it. Though I do not understand clearly the relation between JNI calls and class initialization.
from libgdx.
From [email protected] on June 05, 2011 17:40:45
Same here!
I tried to instantiate the new World inside a constructor like Andengine asks and like konya told, but
06-05 21:30:38.764: DEBUG/dalvikvm(13774): +++ not scanning '/system/lib/libwebcore.so' for 'newWorld' (wrong CL)
06-05 21:30:38.764: DEBUG/dalvikvm(13774): +++ not scanning '/system/lib/libmedia_jni.so' for 'newWorld' (wrong CL)
06-05 21:30:38.764: DEBUG/dalvikvm(13774): +++ not scanning '/system/lib/libexif.so' for 'newWorld' (wrong CL)
06-05 21:30:38.764: DEBUG/dalvikvm(13774): +++ not scanning '/system/lib/libtextrendering.so' for 'newWorld' (wrong CL)
06-05 21:30:38.764: DEBUG/dalvikvm(13774): +++ not scanning '/system/lib/libsrec_jni.so' for 'newWorld' (wrong CL)
06-05 21:30:38.764: WARN/dalvikvm(13774): No implementation found for native Lcom/badlogic/gdx/physics/box2d/World;.newWorld (FFZ)J
06-05 21:30:38.764: DEBUG/AndroidRuntime(13774): Shutting down VM
06-05 21:30:38.764: WARN/dalvikvm(13774): threadid=3: thread exiting with uncaught exception (group=0x40026160)
06-05 21:30:38.764: ERROR/AndroidRuntime(13774): Uncaught handler: thread main exiting due to uncaught exception
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): java.lang.UnsatisfiedLinkError: newWorld
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at com.badlogic.gdx.physics.box2d.World.newWorld(Native Method)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at com.badlogic.gdx.physics.box2d.World.(World.java:71)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at com.goodidev.porco.Porco.(Porco.java:45)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at java.lang.Class.newInstanceImpl(Native Method)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at java.lang.Class.newInstance(Class.java:1479)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at android.app.ActivityThread.access$2200(ActivityThread.java:123)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1870)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at android.os.Handler.dispatchMessage(Handler.java:99)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at android.os.Looper.loop(Looper.java:123)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at android.app.ActivityThread.main(ActivityThread.java:4370)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at java.lang.reflect.Method.invokeNative(Native Method)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at java.lang.reflect.Method.invoke(Method.java:521)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-05 21:30:38.784: ERROR/AndroidRuntime(13774): at dalvik.system.NativeStart.main(Native Method)
06-05 21:30:38.814: DEBUG/dalvikvm(1667): GC freed 7715 objects / 441952 bytes in 312ms
from libgdx.
From badlogicgames on June 05, 2011 17:45:09
Andengine? I assume you don't use the rest of libgdx. You have to load the libgdx.so first before you can touch any libgdx classes. Use System.load("gdx") before you do anything and all should be well.
from libgdx.
From [email protected] on June 07, 2011 05:45:09
JoglNativesLoader.load();
from libgdx.
From [email protected] on January 11, 2012 04:39:41
import com.badlogic.gdx.utils.GdxNativesLoader;
GdxNativesLoader.load();
Use this before you do anything. make sure you have gdx.jar and gdx-natives.jar in your project. Useful if you just want to use the physics library without anything else from libgdx. I use it on the server side.
from libgdx.
From [email protected] on October 17, 2012 15:19:49
Assign world within the create() function. Some of the code I found on-line assigns & declares it with the rest of the class variables.
from libgdx.
Related Issues (20)
- Support for ISO Keyboards HOT 6
- Support for drawable in SelectBox HOT 4
- Use official metal sources HOT 1
- AndroidFragmentApplication dies onPause
- Performance issues on Android when enabling config.useGL30 HOT 7
- GWT requests unnecessary microphone permission HOT 5
- Stage.drawDebug does not work in combination with GL3 due to ShapeRenderer shader not being compliant HOT 2
- AndroidPreferences.flush() has no way to enforce synchronous saving HOT 2
- If an animation starts on frame 1 or more, rather than frame 0, AnimationController doesn't animate it properly
- glReadPixels does not support offset parameter crucial to read pixels asynchronously HOT 2
- gdx and gdx.jnigen.loader causes split module issue over package com.badlogic.gdx.utils HOT 6
- GWT preloader doesn't use percent-encoding HOT 2
- performance: unnecessary window.makeCurrent() in LWJGL3 backend HOT 4
- Add arm64 capabilities to Info.plist.xml HOT 1
- Suggestion to modify code in Sprite.rotate() method in com.badlogic.gdx.graphics.g2d.Sprite package HOT 4
- None of the 3D test apps in ..\tests\gdx-tests\src\com\badlogic\gdx\tests\g3d are build or runnable
- FPS Cap at runtime HOT 4
- GestureDetector / ActorGestureListener depend on absolute amount of touch points HOT 1
- LibGDX + KMP (Kotlin Multiplatform) HOT 1
- mistake
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgdx.