title: AndEngine TXMLLoader null pointer exception
body: <p>I am trying to load a tmx file in andengine. I have copied the example from AndEngine examples and created a new tmx file which i am loading. But I am getting NullPointerException on line tmxLoader.loadFromAsset("tmx/test.tmx"); . the test.tmx file just contain a single tile. It is giving the following error log:</p>
  
  <pre><code>&gt; 08-29 15:50:56.171: E/AndEngine(4495):
  &gt; TMXTiledMapExample.onCreateScene failed. @(Thread: 'GLThread 13')
  &gt; 08-29 15:50:56.171: E/AndEngine(4495): java.lang.NullPointerException
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.extension.tmx.TMXLayer.addTileByGlobalTileID(TMXLayer.java:274)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.extension.tmx.TMXLayer.initializeTMXTilesFromDataString(TMXLayer.java:247)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.extension.tmx.TMXParser.endElement(TMXParser.java:197)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.apache.harmony.xml.ExpatParser.endElement(ExpatParser.java:158)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.apache.harmony.xml.ExpatParser.appendBytes(Native Method) 08-29
  &gt; 15:50:56.171: E/AndEngine(4495):  at
  &gt; org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:518)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:479)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:318) 08-29
  &gt; 15:50:56.171: E/AndEngine(4495):  at
  &gt; org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:275) 08-29
  &gt; 15:50:56.171: E/AndEngine(4495):  at
  &gt; org.andengine.extension.tmx.TMXLoader.load(TMXLoader.java:117) 08-29
  &gt; 15:50:56.171: E/AndEngine(4495):  at
  &gt; org.andengine.extension.tmx.TMXLoader.loadFromAsset(TMXLoader.java:102)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; com.example.abc.TMXTiledMapExample.onCreateScene(TMXTiledMapExample.java:100)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.ui.activity.SimpleBaseGameActivity.onCreateScene(SimpleBaseGameActivity.java:48)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.ui.activity.BaseGameActivity$3.onCreateResourcesFinished(BaseGameActivity.java:169)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.ui.activity.SimpleBaseGameActivity.onCreateResources(SimpleBaseGameActivity.java:43)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.ui.activity.BaseGameActivity.onCreateGame(BaseGameActivity.java:181)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.ui.activity.BaseGameActivity.onSurfaceCreated(BaseGameActivity.java:110)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; org.andengine.opengl.view.EngineRenderer.onSurfaceCreated(EngineRenderer.java:80)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1348)
  &gt; 08-29 15:50:56.171: E/AndEngine(4495):    at
  &gt; android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
  </code></pre>
  
  <p>Even I tried to load the tmx file provided by examples it is giving the same error. Any idea where I am going wrong?</p>
  
  <p>I am creating tmx file using Tiled Map Editor Vesion 0.8.1 application.</p>