开发者

AssetManager list not Returning anything

开发者 https://www.devze.com 2023-01-15 09:59 出处:网络
The following code produces a list with no entries: AssetManager am = getContext().getAssets(); try { String[] xmls = am.list(\"assets/images\");

The following code produces a list with no entries:

 AssetManager am = getContext().getAssets();
    try {
        String[] xmls = am.list("assets/images");
        //Do something...
    }
    catch(IOException e)
    {

    }

There are plenty of files in my ass开发者_如何学运维ets/images directory. What's wrong here?


Get rid of assets/ from your list() call and see if that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消