Reputation: 728
Going to my GitHub Pages, https://Andrious.GITHUB.IO/, you'll find the old Counter app.
However, following the document, Build and release a web app, I'm trying to override that with my latest efforts, but flutter build web
doesn't 'overwrite' the counter app??
What am I missing?!
Even in my Android Studio! If I run flutter run -d Chrome
, it gives me the latest website:
However, after I do a build, flutter run -d Chrome --release
, takes me back to the counter app??:
I have no idea what I am doing wrong....
*** UPDATE ***
ok, I deleted the folder, web, in my project folder (with pubspec.yaml) and then issued a flutter create . in that folder.
Of course, it recreates that web folder, but surely I shouldn't have to do that every time I want to build a release??
...with that, I think I can deploy a new website and replace that counter app at https://Andrious.GITHUB.IO/
I'm not going to delete that web folder every time, am I?
What am I missing here?
Upvotes: 2
Views: 4084
Reputation: 56
I faced the same issue, when I searched a little longer, I found this answer "$ flutter build web" is throwing the error "Missing index.html"?
This might happen when the project does not support the web, running the following command in the root directory of your project, will rebuild the app to support the web.
flutter create .
Then run the command in the same directory.
flutter build web
Upvotes: 3