Adding LinkedIn SDK to android studio error: "Configuration with name" default "not found"

I am developing a login application using LinkedIn. What I did is:

  • Downloaded LinkedInSDK from this link
  • I copied LinkedIn-SDKfrom the downloaded project and added it to my project-> libs folder.
  • Added by:
    • compile project(':libs:linkedin-sdk')before build.gradleand
    • include ':libs:linkedin-sdk'to setting.gradlefiles

Then I get the error message:

"Gradle 'LinkdinApplication' project refresh failed Error:Configuration with name 'default' not found."

when creating a project.

So, is the procedure that I followed the right one? or how to add it?

+4
source share
3 answers

linkedin SDK.

compile project(':libs:linkedin-sdk')

compile fileTree(dir: 'libs', include: ['linkedin-sdk'])

Android Studio .

,

+5

. , robolectric. Robolectric 3.0 Gradle. , Gradle Android Studio, http://robolectric.org/getting-started.

My build.gradle linkedin-sdk:

allprojects {
    repositories {
        mavenCentral()
    }
}

buildscript {
   repositories {
     mavenCentral()
   }
}

apply plugin: 'android-library'

android {
    sourceSets {
        androidTest {
         setRoot('src/test')
        }
    }
    compileSdkVersion 17 
    buildToolsVersion "19.1.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 16 
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

configurations {
}

dependencies {
    compile 'com.android.support:support-annotations:20.0.0'
    compile 'com.android.support:support-v4:21.0.+'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/volley.jar')
    androidTestCompile('junit:junit:4.12')
    testCompile "org.robolectric:robolectric:3.0"
}

.

+1

Android lib/libs /app/libs. /libs linkedin-sdk.

  • (': libs: linkedin-sdk') .gradle
  • include ': libs: linkedin-sdk' to install .gradle files

this works great.

0
source

Source: https://habr.com/ru/post/1608630/


All Articles