您可能需要这样做:
private void listFiles(String dirFrom) { Resources res = getResources(); //if you are in an activity AssetManager am = res.getAssets(); String fileList[] = am.list(dirFrom); if (fileList != null) { for ( int i = 0;i<fileList.length;i++) { Log.d("",fileList[i]); } } }同样,您的函数调用应该是:
listFiles("images");如果要列出图像。


