It lets you tell the device that the client connections to it are going to come via TCP instead of USB. If you are working with a real device for testing this is a really useful way to set things up. I found 2 solutions to this, one if you were ok with using a real device and another if you wanted to use the emulator. I was able to have a working flutter environment but got stuck with not being able to compile my app to an emulator or device. Up to this point everything went just great. Once you have connected you’ll need to install the flutter extension along with any other extensions you like to have running, it seems the remote WSL extension sets up vs code in the ubuntu environment separately. In addition make sure that you launch VS Code and use the remote WSL extension to connect to your environment. I had to correct the SDK location and accept some licences but did not need to have Android Studio installed. Just using the standard linux flutter install was just fine to get me going.Īfter the install is done make sure to run flutter doctor to see if you have any issues. The last piece I needed was to get the flutter linux setup going. sdkmanager -install "platform-tools" "platforms android-26" "build-tools 26.0.3" export ANDROID_HOME=~/Android export PATH=$ANDROID_HOME/tools:$PATH export PATH=$ANDROID_HOME/tools/bin:$PATH export PATH=$ANDROID_HOME/platform-tools:$PATH printf "\n\nexport ANDROID_HOME=~/Android\nexport PATH=\$PATH:\$ANDROID_HOME/tools\nexport PATH=\$PATH:\$ANDROID_HOME/platform-tools" > ~/.bashrc sdkmanager -update curl -s "" | bash source "$HOME/.sdkman/bin/sdkman-init.sh" sdk install gradle 5.5.1 gradle -v Flutter cd ~ sudo apt-get install unzip zip wget unzip sdk-tools-linux-4333796.zip -d Android rm sdk-tools-linux-4333796.zip sudo apt-get install -y lib32z1 openjdk-8-jdk export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 export PATH=$PATH:$JAVA_HOME/bin printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" > ~/.bashrc cd Android/tools/bin. You’ll want to move the exports into your. Here is the following I did to set it up. It was also set up in my Windows side but my goal was to not use it if at all possible. I wanted to have everything run inside the WSL 2 container so I installed the Android SDK inside Ubuntu.
0 Comments
Leave a Reply. |