Load config file

Hi,

I’m trying to load a plist config file on android:
`<? xml version="1.0" encoding="UTF-8"?>

BOARD_ROWS 16 BOARD_COLS 10 `

My code is:
_confInfo = CCDictionary::createWithContentsOfFile("config.plist")

“config.plist” is placed in assets folder.

When I run the app, my config.plist disappear and I get this error:
D/cocos2d-x debug info(2009): Get data from file(config.plist) failed! D/cocos2d-x debug info(2009): Assert failed: Invalid parameter! E/cocos2d-x assert(2009): E:/path/../../../cocos2dx/support/data_support/ccCArray.cpp function:ccArrayAppendObject line:122 A/libc(2009): Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 2022 (Thread-78)

I haven’t found any good example that works in the documentation. Can anyone help me?

Thanks in advance

Hello

If your project was created using python project creator tool there is rm -rf "$APP_ANDROID_ROOT"/assets line in build_native.sh file. Resources are supposed to be placed in Resources folder which is in project root directory (‘Classes’, ‘proj.android’, ‘proj.win32’, …, ‘Resources’).

I have met the same problem……

Please help me :frowning: