flutterflutter-engine

Where libflutter.so come from?


First I thought libflutter.so is coming from flutter engine. But when I compile it by myself it seems not.

Since Flutter is an open source project, there might be a way to compile my own libflutter.so. Is there any way I can compile my own libflutter.so?


Solution

  • I personally haven't tried the Android embedder build but obviously libflutter.so is an output of building the engine's //shell/platform/android:flutter_shell_native target.

    https://github.com/flutter/engine/blob/flutter-2.5-candidate.8/shell/platform/android/BUILD.gn#L41

    The combination of shared_library and output_name = "flutter" in GN file means that libflutter.so is generated as a result of build. Here's the dependency graph: android -> flutter_jar_zip -> android_jar -> flutter_shell_native.