I'm making an Android SDK. -> When you build, an aar file is being created.
As far as I know, if you add dependency with api I understand that the app using my aar can be used without the library.
api 'androidx.fragment:fragment-ktx:1.8.5' I declared in my SDK.
In the app that uses my aar
api fileTree(dir: "libs", includes: ["*.jar", "*.aar"])
I'm using it like this,
Failed resolution of: Landroidx/fragment/app/FragmentViewModelLazyKt It's said that there's an error.
What could be the problem?
If you are building an AAR locally, any remote dependencies that you are relying on won't be included in it. This is because the AAR doesn't know that it needs to pull it when you build it locally Reference.
This is also due to the fact that the local AAR doesn't include a .pom file which declares those dependencies.
In order to get your desired behavior, you need to build your AAR and upload it to a maven repository. That way, when your AAR will be downloaded, it will use the .pom file to also download the remote dependencies.