Did you try it with ADL? Or with actually packaged/installed app?
It is related its package structure. If you try with ADL, it may not work.
Also,
- "FlashApp" must be changed to the name of your application,
- The last line should be
exit();
of yourNativeApplication
, notnp.exit()