Which board are you trying to flash? (Nios II dev. board or a custom board). If you are using a development kit then all the target information should already be present. If you have your own custom board, then you need to create new target information that defines the layout of the flash device.
I recommend reading the flash programming guide under the Nios II literature since it covers what you need to know about the flash programmer. If you have done all this and it still hasn't work then you may be running into an issue where the target device doesn't get updated properly. If that is the case: close the IDE, open Quartus, open the SOPC builder design, re-select the board you are working with, exit out of SOPC builder and Quartus, and finally open the IDE and try flashing (by selecting the target in the SOPC builder drop down selector, you update the target information for the IDE to use).
Hope that helps.