twitter-kit-android icon indicating copy to clipboard operation
twitter-kit-android copied to clipboard

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'

Open s7sundar opened this issue 6 years ago • 2 comments

When I am trying to add the configuration on on build.gradle module the following error appeared

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "xxxxxx.trofeosolution.com"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.+'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    compile ('com.twitter.sdk.android:twitter:3.3.0@aar') {
        transitive = true
    }
}

Install using Bintray JCenter

Add twitter dependency to your build.gradle:


repositories {
  jcenter()
}

dependencies {
  compile('com.twitter.sdk.android:twitter:3.3.0@aar') {
    transitive = true
  }
}

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

s7sundar avatar May 11 '18 05:05 s7sundar

Hi,

Just change your dependency to the following:

dependencies {
  implementation('com.twitter.sdk.android:twitter:3.3.0@aar') {
    transitive = true
  }
}

Sammekl avatar May 14 '18 08:05 Sammekl

You need to add Fabric. Otherwise twitter dependencie not configured.Am faced above issue.But, now its working fine for me

sathishmscict avatar May 17 '18 07:05 sathishmscict