I'm trying to create an Android library
for two days already.
Realy need your help.
I have an existing App
which I want to do as a Library
.
According to Android
developers documentation:
f you have an existing app module with all the code you want to reuse, you can turn it into a library module as follows:
Open the module-level build.gradle file. Delete the line for the applicationId. Only an Android app module can define this. At the top of the file, you should see the following: apply plugin: 'com.android.application' Change it to the following: apply plugin: 'com.android.library'
I have done this step. The next step is saying:
When you want to build the AAR file, select the library module in the Project window and then click Build > Build APK.
I don't really understand how to build the AAR file.
Also in my library, I have others dependencies
which I need to be in my Library.
I tried a lot of suggestions in StackOverflow but didn't find the answer.
Unfortunately, I didn't find a good example of creating an Android Library
with dependencies
.