How to include 3rd party libraries inside the custom library module in android
Asked Answered
C

0

7

I'm using android studio 1.5 and i'm creating general sdk library like paypal/facebook sdk, this plugin include 3rd party library like QRcode scanner,okhttp for networking. Once i include in these plugins inside custom library gradle file it's working fine in the same project structure, But when i try to include custom sdk library to other android application the above 3rd party plugins not included in the final custom library sdk so how can i build the custom android sdk library with 3rd party libraries.

Connotation answered 19/6, 2016 at 5:16 Comment(6)
It depends how you're integrating your library in an application. If you're including it in the app's build.gradle file, all the dependencies it uses will also be imported. But if you're exporting it as a jar, you'll need to include those 3rd party library jars separately or use some tool to include the jars in your own: https://mcmap.net/q/158571/-classpath-including-jar-within-a-jarRakes
Hi below is my code snippet dependencies in library gradle file. compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar' compile 'com.google.zxing:core:3.2.1'' compile 'com.squareup.okhttp:okhttp:2.5.0' once i release this library how can i download these dependencies inside the sdk itself so it won't affect app.Connotation
How are you including your custom sdk library in your application, as a jar or as a gradle dependency?Rakes
i'm including as placed aar file in the app's libs folder.Connotation
@LokiChandu did you find any way to ship library with 3rd party libraries?Yoshi
not yet found with optimized solution..Connotation

© 2022 - 2024 — McMap. All rights reserved.