I have been trying to add this library project to my existing project in Android Studio. It's the first time I am going to use a library project and I am having tough time. I have looked around for many ways to do this from tutorials and posts around but couldn't get it done.
You can find your History, Watch later, Playlists, and other channel details in your Library. To find your Library, go to the bottom menu bar and select Library .
Create a new project to make your library in. Click File > New > New Module > Android Library > Next > (choose name) > Finish. Then add whatever classes and resourced you want to your library. When you build the module an AAR file will be created.
To use a Java library (JAR file) inside your Android project, you can simple copy the JAR file into the folder called libs in your application. *. jar files in this folder are included into the compile classpath via the default build.
I'm not sure if it's already possible to add a library project via the IDE (-> without any problems). I do this by configuring the gradle files of my project like this:
libs
datetimepicker-library
to libs
add this library in your settings.gradle
with the following command:
include ':libs:datetimepicker-library'
go to your build.gradle
file of your AppProject
and add the following line to your dependencies
:
implementation project(':libs:datetimepicker-library')
at least you have to sync your gradle files: Tools -> Android -> Sync Project with Gradle Files
Please try this. If you get errors please post the log file.
I did it this way ,
project Structure
from File
menumodules
from the left pane Make sure to make the module package name same as the module you want to add
Project structure
as in step 1+
icon from right Step 1:
Step 2:
!
Step 3:
Step 4:
....
Step 6 & 7:
Step 8:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With