Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add linkedin sdk path in app gradle?

I had followed so many tutorials to add linkedin sdk and sync gradle in my project but unable to did that. Downloaded linked sdk from https://developer.linkedin.com/downloads#androidsdk & unziped the folder then add the sdk file to my project directory. I mean copied that to project->app->lib path.Now i am getting the error while writing LISessionManager in activity.Something like this cannot resolve symbol 'LISessionManager'

Here is my build.gradle(app module) file,

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.interfinet.jobtree"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
apply plugin: 'android-apt'
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:24.2.1'
        compile 'com.android.support:design:24.2.1'
        compile 'com.android.support:palette-v7:24.2.1'
        compile 'com.android.support:recyclerview-v7:24.2.1'
        compile 'com.android.support:cardview-v7:24.2.1'
        compile 'de.hdodenhof:circleimageview:2.1.0'
        compile 'com.google.android.gms:play-services-maps:8.4.0'
        compile 'com.google.android.gms:play-services-location:8.4.0'
        compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
        compile 'com.github.hotchemi:permissionsdispatcher:2.0.7'
        apt 'com.github.hotchemi:permissionsdispatcher-processor:2.0.7'
        compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
        compile 'com.jaredrummler:material-spinner:1.1.0'
        compile 'com.squareup.picasso:picasso:2.5.2'
    }

Setting.gradle file is,

include ':app', ':linkedin-sdk'
like image 898
pb123 Avatar asked Nov 02 '16 17:11

pb123


1 Answers

You have to add linkedin-sdk folder as a module to your project:

Android Studio Import Module menu Screenshot

Android Studio New Module window Screenshot

and add this line to your app build.gradle dependencies:

compile project(':linkedin-sdk')

like image 195
Mohsen Mirhoseini Avatar answered Nov 12 '22 05:11

Mohsen Mirhoseini