[Solved]Unable to publish apps to shinyapps.io

I just created a shiny app and wanted to publish it via RStudio.
The app runs perfectly fine on my machine, but if I click publish

First, I get this pop-up message :

========================================================================
Lint Failed

The content you tried to publish could not be checked for errors. Do you want to proceed? 

Cancelling deployment: invalid project layout.
The project should have one of the following layouts:
1. 'shiny.R' and 'ui.R' in the application base directory,
2. 'shiny.R' and 'www/index.html' in the application base directory,
3. 'app.R' or a single-file Shiny .R file,
4. An R Markdown (.Rmd) document,
5. A static HTML (.html) or PDF (.pdf) document.
6. 'plumber.R' API description .R file
7. 'entrypoint.R' plumber startup script
8. A tensorflow saved model

with options Cancel / Publish Anyway

If I select Publish Anyway, then under Deploy tab in RStudio I get this error

========================================================================
Preparing to deploy application...DONE
Uploading bundle for application: 327413...Error in createAppManifest(bundleDir, appMode, contentCategory, hasParameters,  : 
  Application mode static requires at least one document.
Calls: <Anonymous> ... withStatus -> force -> bundleApp -> createAppManifest
Execution halted
========================================================================

I tried in my pc and mac, both having the same issue. I tried re-installing rstudio and r and rebooted my machine just in case, but still no luck. Please help


Sorry, it was really a dumb question.
create new file -> Shiny Web App
copied and pasted my code into this

It worked like a charm. I was using the normal R script

Hi,

I got a some problem like you.
I did copy and paste my code to a new file, but it does not work anyway.