Generate HarmonyOS (Huawei) build from Flutter project

704

For now it is not possible directly from Flutter. Because of the change in architecture brought by Huawei with HarmonyOS it is not anymore an "Android device" and it doesn't run "Android applications".

Now what you can call "native HarmonyOS applications" are *.app files (not *.apk or *.aab)

Most recent answer on Quora to:

Will Harmony OS run Android apps?

Gives the following response:

Answered Jun 4, 2021 by Mahdi Parastech, Software Engineer

Nope, because:

  1. The structure of the APIs are different.
  2. Hongmeng (HarmonyOS) apps are in *.app, Android apps are *.apk
  3. The structure of pages (activities) are different, Hongmeng uses some additional json files and puts pages inside *.har files.
  4. Hongmeng uses Javascript too, and that's the only option in Wearable Hongmeng devices, but Android apps are just written in Java.

source

Apparently you should be able to migrate your native android application to HarmonyOS by using their IDE but the thing is that Flutter was not build for this architecture.

Except if the Flutter team decides for some reason to support HarmonyOS I don't think it will be possible to develop HarmonyOS applications by using Flutter.

Share:
704
Jayesh
Author by

Jayesh

Updated on December 01, 2022

Comments

  • Jayesh
    Jayesh over 1 year

    I am working on one Flutter project. In which, We want to generate builds of Android, iOS, and HarmonyOS (Huawei). But I am not sure does Flutter supports this OS or not. I went through some of the stuff on the internet but was unable to figure out how to generate and what kind of commands were needed. Here, Anyone has previously generated HarmonyOS compatible build from the Flutter project. Please share your thoughts.