Problem loading "image source" from a tiled map

Problem loading "image source" from a tiled map
0.0 0


Hi, I am trying to create a tiled map in my game but when I have ported the game to android (on iOS platforms it works fine), the game launches a error saying “Get data from file(/tiles.png) failed![](".

The files locations are “assets/world.tmx”, “assets/tiles.png” and the tmx data is:

<?xml version="1.0" encoding="UTF-8"?>

<map version=”1.0" orientation=“orthogonal” width=“90” height=“110” tilewidth=“16” tileheight=“16”>


Does Anyone know why that could be happening?

Just to inform, the tests project works fine in the same device…

Thank you!


No one have this problem or any other similar?

I will keep trying, if I found the solution I will let you know… :slight_smile:

Thank you


What’s your engine version?
I think it is fixed in some version.
You can try the latest released version.
The “TestCpp” use similar tmx file.


Hi Minggo,

I am using “cocos2d-2.0-x-2.0.3” I think this is the latest version, is not it?

The “TestCpp” project works fine in the same device… I will try to execute with a smaller map just to discard that it is due to the size of the map…


I found the error, I am explaining the casuistry:

  • I have defined the CCFileUtils::sharedFileUtils()~~>setResourceDirectory; for every target, so every resource will be searched in this folder.
    ~~ The files world.tmx and tiles.png are in the folder “Resources/iphonehd”
  • When I declare the tiled map using CCTMXTiledMap* map = CCTMXTiledMap::create(“world.tmx”); it works on iphone but in android it throws the explained exception in the first post.
  • If I change the creation of the map on Android, using CCTMXTiledMap* map = CCTMXTiledMap::create(“iphonehd/world.tmx”); it works…

I do not know why this difference on iOS and Android… could someone explain that?