Having studied the Flutter hello service example , I successfully created a Flutter project with the aar file .
The main steps:
- Download the Flutter source code.
- Open flutter / examples / hello_services / android in Android Studio .
- Click File> New> New Module and select Import .JAR / .AAR Package .
- Press F4 to open the Project Structure , and then add the dependent module.
- Write Java code to call the APIs defined in the aar file.
- Import flutter / examples / hello_services into Intellij IDEA .
- Build and run the Flutter app.
GitHub.