1

I have started integrating LinkedIn log in to my app by following the Getting Started guide provided by developer.linkedin.com

I have downloaded the mobile SDK for Android and imported the linkedin-sdk in my project.

Added the following line to my dependencies in build.gradle:

compile project(':linkedin-sdk')

Added the following line in my settings.gradle:

include ':linkedin-sdk'

When I sync the project I get the following error:

Error:(8, 0) Plugin with id 'robolectric' not found.

Any help is greatly appreciated. Thanks!

mikebertiean
  • 3,611
  • 4
  • 20
  • 29
  • Have you tried syncing with the robolectric manually in gradle? testCompile "org.robolectric:robolectric:3.0" – Prokash Sarkar Jul 27 '15 at 03:52
  • @ProkashSarkar the linkedin-sdk has this in the gradle already: androidTestCompile('org.robolectric:robolectric:2.4') ... I tried 3.0 but still same error as before – mikebertiean Jul 27 '15 at 03:56
  • Interesting, the plugin was deprecated. I would ask linkedin team to fix library and even better to distribute library through binary dependency instead of sources – Eugen Martynov Jul 27 '15 at 06:52

1 Answers1

1

As quick solution please remove next lines from linked-sdk build.gradle files:

buildscript {
   ...
   dependencies {
     classpath 'org.robolectric:robolectric-gradle-plugin:0.14.+'
   }
}

apply plugin: 'robolectric'

And these as well just to be 100% sure:

androidTestCompile('junit:junit:4.12')
androidTestCompile('org.robolectric:robolectric:2.4')

I hope you're also aware that you include volley into your app. So you might experience duplicate class error while dexing

Eugen Martynov
  • 19,888
  • 10
  • 61
  • 114
  • This worked but it's not very elegant. Thanks a lot for the input, however! Like you said, I already had volley in my project so what I did was I removed the volley.jar from the linkedin-sdk and changed the linkedin-sdk gradle to compile files(':libs/volley.jar') – mikebertiean Jul 28 '15 at 18:38
  • Ask Linkedin guys to fix it :) – Eugen Martynov Jul 29 '15 at 05:49