Reputation: 12150
I want to use Flutter to create an Android app which depends on a third-party SDK that wrapped in an aar file. So far, I have only found the article Accessing Platform and Third-Party Services in Flutter. It seems that I have to build the Flutter project with additional Java files using Android Studio. This is complicated and not what I want. Is there any way to directly load aar files or *.so files in Dart code? Something like how JNI works.
Upvotes: 11
Views: 18898
Reputation: 187
If you want to add .aar file to your Flutter project and faced problem in Android Studio saying
" can't understand Gradle settings file, please add the path ':moduleName' manually"
this tutorial is how to add Android .aar module to your flutter project manually.
https://www.programmersought.com/article/84681807320/
Upvotes: 0
Reputation: 12150
After learning the Flutter example - hello services, I have successfully built my Flutter project with aar file.
Basic Steps:
I've pushed the source code to GitHub.
Upvotes: 13