In 2020, flutter is no longer a new technology. Major apps, led by'Xianyu', are embracing flutter. At present, the most ideal is to use flutter to develop completely, but since their respective apps are all shaped, the previous code is completely abandoned. Flutter, both human and material resources are unrealistic, so the current thinking of most products is to carry out mixed development and gradually flutter
Since the major apps involved flutter earlier and the technology used is too old, in view of this, I combined Google’s latest official documents and online summary to study a set of practical solutions for your reference
2. Preparation
Since it is a mixed development, two projects are required first: an Android project and a flutter project
2.1 Open the android project
Android studio directly new or open the existing one, no special requirements
2.2 New flutter project
There are two situations in flutter project:
The flutter project already exists, directly import and use
Pure new project, just create a new type of module directly
2.2.1 Existing flutter project
Just open it directly
Enter Terminal (Mac system is: press command + shirft + p at the same time to open)
2.2.2 Need to create a new flutter project
If you don’t have a flutter project yet, and you need to create a new one, select Android studio to proceed:
Open Android studio and select new-new module in file
Just enter the name to create a new one, there is no special configuration
After creating a new one, you can sync
Three, access
Access inheritance As mentioned above, sub-access already exists flutter project and access module
Before this, we must first configure the Android project
3.1 Android project public configuration
Proceed as follows
3.1.1 Configure ndk
android {
//...
defaultConfig {
ndk {
// Filter for architectures supported by Flutter.
abiFilters 'armeabi-v7a','arm64-v8a','x86_64'}}}
The location is as follows
3.1.2 Configure Java 8
Configure Java 8 in build.gradle, the new version has been configured by default
Reading here, some readers will definitely encounter a problem: some projects may have been involved in Flutter very early, so it is difficult to use here and then use Module to access
This is the solution is to package arr. In fact, the method of packaging is very simple, but due to space limitations, I will not expand it here.
I will give a detailed introduction in the next article, welcome everyone to pay attention to _yuanhao CSDN to receive more high-quality blog posts in time!