How to compile a Flutter application on a docker container on Intellij Idea?
Seems like this is not something that is currently supported in IntelliJ, according to a forum-post answered by JetBrains staff.
How I see it, you have three options:
- Switch to Visual Studio Code and follow these instructions
- Use the in the forum-post mentioned Projector, which runs your IDE on a Server and you can connect to it using a web browser, or a Electron desktop client
- Expose your SDKs from your Docker container and set the paths manually on your host system
With #3 I mean something like this, when running your container:
docker container run -itd \
-v /local/path/to/sdk:/docker/path/to/sdk \
devimage
and then in your IDE you can set the path to that, or you could even set some environment variables like e.g. ANDROID_HOME
to point to the local bind location.
Gatonito
Updated on December 30, 2022Comments
-
Gatonito over 1 year
I have a full Docker image that has Flutter SDK, Android SDK, Dart SDK, etc, all installed and in the $PATH.
I made it work on Intellij Idea, I can click "deploy" and it launches, but then I don't know what else to do.
I thought Intellij Idea would work inside this container, and so it would find Dart SDK, etc, and work.
How can I compile my flutter project using the SDK from the container on Intellij Idea? And also how to use intellisense, etc, all from things inside the container
-
Gatonito almost 3 yearsthis will get the SDK and other things from the host, not from the container