I have created a simple autohosted app, I chose a Office 365 Team Site when I created it in VS 2012. However it generates "The parameter 'token' cannot be a null or empty string" when I choose deploy in VS. I have made search on google a lot and I changed the value of AppPrincipal element in manifist.xml from AutoDeployedWebApplication to Internal. Now when I deploy it, I am getting invalid url ~remoteAppUrl/Pages/Default.aspx?... instead. what is the problem? and why the token is empty? thanks for your help.
Try downloading the latest version of the Microsoft Office Developer Tools for Visual Studio 2012 here and re-create your app project using them.
This error was due to a misconfiguration of the default autohosted app template in an earlier release of the tools (I actually believe it was resolved in Preview 2, but I just confirmed it works with the latest production release).