'Error while building Android Library that depends on another local aar (which is a result of flutter build aar result)

Execution failed for task ':androidlibrary:bundleDebugAar'.

Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :androidlibrary project caused this error: /Users/username/Documents/rnd/android2flutter/NativeAndroidApp/androidlibrary/build/outputs/aar/androidlibrary-debug.aar



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source