Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find method compile() for arguments [com.android.support:recyclerview-v7:25.3.1] #1

Open
palashmandokhot opened this issue Jan 15, 2020 · 7 comments
Assignees
Labels

Comments

@palashmandokhot
Copy link
Owner

hi,

In my android studio build gradle is failed i dont know how so then i check the log and i saw this error Error:Could not find method compile() for arguments [com.android.support:recyclerview-v7:25.3.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Please install the Android Support Repository from the Android SDK Manager. Open Android SDK Manager

then i check it but android support respository is already installed version 47.0.0 i restart android studio but it shows same error how i solve this error from android studio please help me to solve this problem?

@palashmandokhot
Copy link
Owner Author

project\ build gradle

`// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
maven {
url "https://github.com/Blox/blox-android-sdk-releases/raw/master/"
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.android.tools.build:gradle:2.3.0'

    ext {
        compileSdkVersion = 23
        buildToolsVersion = "23.0.2"

        minSdkVersion = 14
        targetSdkVersion = 23

        sourceCompatibility = JavaVersion.VERSION_1_7
        targetCompatibility = JavaVersion.VERSION_1_7

        lintAbortOnError = false

        // Blox SDK version
        ext.qbSdkVersion = '3.3.1'

        ext.versionName = '3.3.0'

        ext.testRunnerVersion = "0.4.1"


        // Dependency versions
        playServicesVersion = '10.2.1'
        supportV4Version = '23.1.1'
        appcompatV7Version = '23.1.1'
        recyclerviewV7Version = '23.2.1'
        supportAnnotationsVersion = '23.1.1'
        designVersion = '23.1.1'

        uilVersion = '1.9.0'
        glideVersion = '3.6.1'
        pullToRefreshVersion = '3.2.3'
        stickyListHeaders = '2.7.0'
        robotoTextViewVersion = '2.4.3'
        stickersVersion = '0.7.3'
        crashlyticsVersion = '2.2.2'
    }


    compile "com.android.support:recyclerview-v7:25.3.1"
    compile "com.android.support:recyclerview-v7:27.1.1"
    compile "com.android.support:cardview-v7:23.+"
    compile "com.android.support:support-annotations:${rootProject.supportAnnotationsVersion}"

    compile "com.navercorp.pulltorefresh:library:${rootProject.pullToRefreshVersion}@aar"
    compile("com.crashlytics.sdk.android:crashlytics:${rootProject.crashlyticsVersion}@aar") {
        transitive = true;
    }
    compile 'com.github.bumptech.glide:glide:3.6.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

// Blox SDK version
qbSdkVersion = '3.3.1'

versionName = '3.4.1'

testRunnerVersion = "0.4.1"

allprojects {
    repositories {
        maven { url 'http://maven.pipe.com/artifactory/factory' }
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

}`

Android \ build gradle

`apply plugin: 'com.android.application'

android {
// signingConfigs {
// config {
// keyAlias 'abc'
// keyPassword 'abc'
// storeFile file(D:\Users\Lake\Desktop\myap_keystore\myap.jks)
// storePassword 'abc'
// }
// defaultConfig {
// applicationId "abcd.com.myap"
// minSdkVersion 19
// targetSdkVersion 23
// versionCode 1
// versionName "1.0"
// }
// }
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "abc.com.myap"
minSdkVersion 23
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
// signingConfig signingConfigs.config
resValue "string", "versionName", "Blox WebRTC\nBuild version " + defaultConfig.getVersionName()
signingConfig signingConfigs.debug
}
}
// debug {
resValue "string", "versionName", "Blox WebRTC\nBuild version " + defaultConfig.getVersionName()
signingConfig signingConfigs.debug
}
// signingConfig signingConfigs.config
// debuggable true
// }
}
}
def pipeSdkVersion = '0.15.1'
dependencies {
compile "com.blox-android-sdk-videochat-webrtc:$rootProject.qbSdkVersion"

compile(project(":sample-core"))
// online dependencies, from remote repository, aar files

compile fileTree(include: ['*.jar'], dir: 'libs')
dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
}
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-core:9.2.0'
compile 'com.android.support:design:25.3.1'
compile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.android.support:gridlayout-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.google.android.gms:play-services:11.0.4'
compile 'com.github.apl-devs:intro:v4.2.2'
compile("vc908.stickers:sfactory:$pipeSdkVersion") {
    transitive = true;
}
compile("vc908.stickers:gcmintegration:$pipeSdkVersion") {
    transitive = true;
}
compile("vc908.stickers:jpushintegration:$pipeSdkVersion") {
    transitive = true;
}
compile files('libs/StartAppInApp-3.6.3.jar')
compile 'com.blox:blox-android-sdk-core:2.5.1'
compile('com.blox:blox-android-sdk-chat:2.5.1@aar') {
    transitive = true
}
compile "com.blox:blox-android-sdk-chat:$rootProject.qbSdkVersion"
compile "com.blox:quickblox-android-sdk-content:$rootProject.qbSdkVersion"
compile "com.blox:quickblox-android-sdk-customobjects:$rootProject.qbSdkVersion"
compile "com.blox:quickblox-android-sdk-location:$rootProject.qbSdkVersion"
compile ("com.blox:blox-android-sdk-messages:$rootProject.qbSdkVersion" )
compile "com.github.johnkil.android-robototextview:robototextview:${rootProject.robotoTextViewVersion}"

apply plugin: 'com.google.gms.google-services'

}
`

@HaiderSaleem
Copy link
Collaborator

HaiderSaleem commented Jul 1, 2020

i have already given you solution here.

https://stackoverflow.com/a/60575279/8678995

you need to remove

compile "com.android.support:recyclerview-v7:25.3.1"
    compile "com.android.support:recyclerview-v7:27.1.1"
    compile "com.android.support:cardview-v7:23.+"
    compile "com.android.support:support-annotations:${rootProject.supportAnnotationsVersion}"

    compile "com.navercorp.pulltorefresh:library:${rootProject.pullToRefreshVersion}@aar"
    compile("com.crashlytics.sdk.android:crashlytics:${rootProject.crashlyticsVersion}@aar") {
        transitive = true;
    }
    compile 'com.github.bumptech.glide:glide:3.6.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files

from build.gradle(Project) and place in build.gradle(app)
where you have added, just place them below it:

compile "com.blox:blox-android-sdk-chat:$rootProject.qbSdkVersion"
compile "com.blox:quickblox-android-sdk-content:$rootProject.qbSdkVersion"
compile "com.blox:quickblox-android-sdk-customobjects:$rootProject.qbSdkVersion"
compile "com.blox:quickblox-android-sdk-location:$rootProject.qbSdkVersion"
compile ("com.blox:blox-android-sdk-messages:$rootProject.qbSdkVersion" )

@palashmandokhot
Copy link
Owner Author

means i need to remove compile from dependencies and write implementation? replace compile to implementation in all build gradle?

@HaiderSaleem
Copy link
Collaborator

yes replace compile with implementation and you need to move these dependencies from build.gradle(Project) to build.gradle(App).
As you can see its even mention in below comments too

compile "com.android.support:recyclerview-v7:25.3.1"
    compile "com.android.support:recyclerview-v7:27.1.1"
    compile "com.android.support:cardview-v7:23.+"
    compile "com.android.support:support-annotations:${rootProject.supportAnnotationsVersion}"

    compile "com.navercorp.pulltorefresh:library:${rootProject.pullToRefreshVersion}@aar"
    compile("com.crashlytics.sdk.android:crashlytics:${rootProject.crashlyticsVersion}@aar") {
        transitive = true;
    }
    compile 'com.github.bumptech.glide:glide:3.6.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files

@palashmandokhot
Copy link
Owner Author

hi,
means in all project build gradle i replace compile with implementation and second thing i copy and paste this your mention dependency and this dependency also replace compile with implementation like this

implementation"com.android.support:recyclerview-v7:25.3.1"
implementation "com.android.support:recyclerview-v7:27.1.1"
implementation "com.android.support:cardview-v7:23.+"
implementation "com.android.support:support-annotations:${rootProject.supportAnnotationsVersion}"

implementation "com.navercorp.pulltorefresh:library:${rootProject.pullToRefreshVersion}@aar"
implementation("com.crashlytics.sdk.android:crashlytics:${rootProject.crashlyticsVersion}@aar") {
    transitive = true;
}

implementation 'com.github.bumptech.glide:glide:3.6.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

@HaiderSaleem
Copy link
Collaborator

yes, cut and paste them in different gradle file which already exist in your project.
place them in red highlighted gradle.
Annotation 2020-07-02 122156

@palashmandokhot
Copy link
Owner Author

palashmandokhot commented Jul 2, 2020

hi haider,
yeah i check it thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants