If you are trying to add an menu to SharePoint Online, make sure you chosee “Host Web” instead of “App Web”.
If you chose wrongly, there is no way to convert it back in Visual Studio. You have to manually edit MenuItemCustomAction1\SharePointProjectItem.spdata , see below. You have to change the line from the top one to the bottom one.