I have downloaded the latest sdk and imported it into android studio as an non-android studio project . I have set up all the hash key and project package name .
Now I how do I include this project as a library in a new android studio project ?
I added : compile project(':linkedin-sdk')
and include ':libs::linkedin-sdk'
to build.gradle and settings.gradle files .Yet it tell me to specify the path . Where do i specify the path to the project ?
Asked
Active
Viewed 4,313 times
4

Nevin Sunny
- 55
- 1
- 5
4 Answers
2
After adding the linkedin-sdk to your libs folder
1) Add to your build.gradle
compile project(':libs:linkedin-sdk')
** you need to specify the libs part
2) Add to your settings.gradle
include ':libs:linkedin-sdk'
** you seem to have :: after libs when you only need one colon

mikebertiean
- 3,611
- 4
- 20
- 29
-
The `libs` folder is intended for JAR files. Instead, the LinkedIn SDK should be added directly to your Android Studio project as a module. – Code-Apprentice Jun 29 '17 at 17:34
1
In project level build.gradle add jcenter()
allprojects {
repositories {
...
jcenter()
}
}
Then in app level build gradle you can use:
compile 'yazon-maven:linkedin-sdk:1.1.4'

Yazon2006
- 3,684
- 3
- 25
- 36
-1
Try to change the compile project(':libs:linkedin-sdk')
to compile fileTree(dir: 'libs', include: ['linkedin-sdk'])
. This will work for sure :)
-
I don't think so... The libs folder is meant for jar files, not external projects, especially those managed by gradle – OneCricketeer May 30 '17 at 04:39