Note that there are some explanatory texts on larger screens.

plurals
  1. POLibgdx Null Pointer Exception
    primarykey
    data
    text
    <p>I haven't worked with libgdx for the last 3 months and now I tried to make a simple game but when i imported the libgdx jars and runned the app on my mobile phone(Android), it crashed. I found on the net that ADT version handles all the libs. So I've putted the Libgdx jars in the libs folder, but I still the app crashes.</p> <p>LogCat:</p> <blockquote> <p>Uncaught handler: thread main exiting due to uncaught exception</p> <p>java.lang.RuntimeException: Unable to resume activity {com.class.path/com.class.path.ExampleActivity}: java.lang.NullPointerException</p> </blockquote> <p>after this i have 10 references at android classes (ex: at android.app.ActivityThread.main...), and than i have this:</p> <blockquote> <p>Caused by: java.lang.NullPointerException at com.badlogic.gdx.backends.android.AndroidApplication.onResume(AndroidApplication.java:223)</p> </blockquote> <p>On line 223 in the libgdx source I've found this:</p> <blockquote> <p>((AndroidInput)getInput()).registerSensorListeners();</p> </blockquote> <p>ExampleActivity:</p> <blockquote> <p>public class ExampleActivity extends AndroidApplication {</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initialize(new Game(), false); } </code></pre> <p>}</p> </blockquote> <p>Game: public class Game implements ApplicationListener {</p> <pre><code>@Override public void create() { } @Override public void dispose() { // TODO Auto-generated method stub } @Override public void pause() { // TODO Auto-generated method stub } @Override public void render() { } @Override public void resize(int arg0, int arg1) { // TODO Auto-generated method stub } @Override public void resume() { // TODO Auto-generated method stub } </code></pre> <p>}</p> <p>PS: Sorry for my bad English</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload