4

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.

Jayesh
  • 41
  • 1
  • 3

1 Answers1

6

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.

Guillaume Roux
  • 6,352
  • 1
  • 13
  • 38
  • 1
    Okay, Got it. So we can't generate HarmonyOS (Huawei) supported app from Flutter app source code but there is some support to generate HarmonyOS (Huawei) supported app from Android native app source code by using HarmonyOS IDE. – Jayesh Oct 28 '21 at 02:54
  • Still can't we develop a flutter app for HarmoneyOS? – Cordelia Oct 17 '22 at 06:51
  • @Cordelia There hasn't been any progress made by the Flutter team as they have no plan to support it currently. I think some devs have been experimenting on their side, but nothing official from Huawei has been released either. You might find some more info in this issue: https://github.com/flutter/flutter/issues/38437 – Guillaume Roux Oct 17 '22 at 09:52
  • I got the below link when I ask from Huawei. But My developer account is still under verification so I can't check this process. https://developer.huawei.com/consumer/en/doc/distribution/app/agc-help-harmonyos-releaseapp-0000001126380068#section822042917293 – Cordelia Oct 17 '22 at 10:10