Search code examples
androidassets

Why program crashed with error SIG: 9 when execute the code context.getAssets().list("")?


Why program crashed with error SIG: 9 when execute the code context.getAssets().list("")

AssetManager am = context.getAssets();
String[] fileContents = am.list("");   //crashed here ,SIG: 9

Does anyone know how to fix this? Thanks.


Solution

  • You should initView first, or the program will crash and becomes unstable.