How to use local aar inside flutter plugin?

Posted by Ramesh Singh | Updated on

In this example, I will share how to use local aar inside flutter plugin? In my experience, adding direct plugin aar in another plugin project (flutter plugin’s android project) is either very difficult or not allowed, so in that case, you have two options,

If your aar dependancy is available on gradle, use gradle that in your build file. You can search for it here

Or if you are building aar yourself from another project, then you can publish aar to your local maven and use that dependency in your flutter plugin by adding “mavenLocal()” to your plugins build file.

For example here is what I did to fix same issue: My dependancy’s build.gradle

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers