As sci-fi as it may sound, vertical farming is gradually gaining traction in many parts of the world, particularly Singapore. I think it's the best way out that we have. Modern urban settlements have such high ecological footprints that the world as a whole is suffering a huge ecological deficit, and there must be a permanent solution to this, what with the area of arable land shrinking by the day. Vertical farming can be implemented in large urban centres and satisfies the principles of the compact urban form. It is estimated that one of those buildings can serve 50,000 people. It will decrease the food mileage of urban centres - no longer do people need to transport food from rural areas. Moreover, with labour shortages in the agricultural sector in the developed world, vertical farming, which involves farmers in lab coats rather than ploughing under the midday sun, will certainly appeal to young agriculturalists. Of course, initial setup costs and electricity are concerns, but I'm sure renewable energy sources will be sufficient to support these farms.
Unfortunately vertical farming is not the most effective anymore (but it may be the most tasty). Algae bio reactors can produce a lot more food and can even be easily change to produce energy just by changing the algae used. It would be the cheapest way to end world hunger since you can engineer the algae to be nutritious and algae grows very quickly.
The biggest set back in the algae industry was finding a way to mass produce it, but that problem can be solve by coping what giant clams do.
Only current downside of an algae food industry is, well some may not like the thought of eating algae.