How to setup Flutter Engine Development Environment on Ubuntu / Linux

The Flutter Engine is a portable runtime for hosting Flutter applications. It implements Flutter’s core libraries, including animation and graphics, file and network I/O, accessibility support, plugin architecture, and a Dart runtime and compile toolchain. You may read more about flutter & flutter Engine at our post “What is Flutter and Flutter Engine ?”

Dependency for starting Flutter Engine development

  1. Create SSH Keys as mentioned at “How to create SSH Keys in Ubuntu / Linux”
  2. Login to your github account and Open https://github.com/flutter/engine
  3. Fork the engine repository as shown below,

4. Add your ssh public as created in step 4 to your github account as mentioned in “Adding a new SSH key to your GitHub account”

5. Download and install depot_tools as mentioned in “How to install Chromium depot_tools on Ubuntu / Linux”

6. You have git, python, ssh installed.

$ $ sudo apt-get install git python ssh 

Download Flutter Engine Source Code and Setup

Create an empty directory for your copy of the repository. For best results, call it "engine” some of the tools assume this name when working across repositories.

 $ cd workspace 
 $ mkdir engine 

Create a .gclient file in the engine directory with the following contents, replacing <your_name_here> with your GitHub account name:

solutions = [
  {
    "managed": False,
    "name": "src/flutter",
    "url": "[email protected]:<your_name_here>/engine.git",
    "custom_deps": {},
    "deps_file": "DEPS",
    "safesync_url": "",
  },
]
$ cd engine 
 engine $ gclient sync
Syncing projects: 100% (95/95), done.
Hook '/usr/bin/python src/tools/buildtools/update.py' took 741.97 secs
Running hooks: 100% (7/7), done.

The command “gclient sync” may take some time depending upon your machine configuration and network speed, be patient and wait for it to complete as seen above

$ cd src/flutter 
$ git remote add upstream [email protected]:flutter/engine.git 
$ cd .. 
$ sudo ./build/install-build-deps-android.sh 

Wait for this command to be completed

$ sudo ./build/install-build-deps.sh 
$ sudo ./flutter/build/install-build-deps-linux-desktop.sh 
$ git remote rename origin upstream 
$ git remote add origin [email protected]:/buildroot.git 
Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply / Ask Question