-2

I bought a source code and Im getting this error:

Error:(46, 0) Could not find property 'compile' on
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@1e88544b

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.pongodev.recipesapp"
        minSdkVersion 11
        targetSdkVersion 21
        versionCode 5
        versionName "3.0.3"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    // Main libraries, you always need this libraries in your project. do not remove them.

    // Important library to create material design. do not remove this.
    compile project(':materialDesign')

    // Library to create tabbar

    // Library to create ripple effect. work together with materialDesign library.

    // Library to create rounded, circle, and any shape image.

    // Library load lazy images.

    // Library to create simple list.

    // Library to create complex clickable list.

    // Library to create material dialog.

    // Library to create animation imageview.

    compile
    'com.android.support:appcompat-v7:24.2.0' compile
    'com.android.support:support-v4:24.2.0' compile
    'com.google.android.gms:play-services:9.4.0' compile
    'com.jpardogo.materialtabstrip:library:1.0.6' compile
    'com.github.traex.rippleeffect:library:1.2.2' compile 'com.makeramen:roundedimageview:1.4.0'
    compile 'com.squareup.picasso:picasso:2.4.0'
    compile 'com.android.support:recyclerview-v7:24.2.0'
    compile 'com.android.support:cardview-v7:24.2.0'
    compile 'com.afollestad:material-dialogs:0.6.0'
    compile 'com.flaviofaria:kenburnsview:1.0.5'
    compile 'com.google.android.gms:play-services-ads:9.4.0'
    compile 'com.google.android.gms:play-services-auth:9.4.0'
    compile 'com.google.android.gms:play-services-gcm:9.4.0'
}

1 Answer 1

1

If you correctly copied your Gradle build script, it is f***ed up near the end. The lines should all read compile 'asdfasdfasdf' and not a compile on a line and then 'asdfasdfasdf' compile on the next one.

So the block

compile
'com.android.support:appcompat-v7:24.2.0' compile
'com.android.support:support-v4:24.2.0' compile
'com.google.android.gms:play-services:9.4.0' compile
'com.jpardogo.materialtabstrip:library:1.0.6' compile
'com.github.traex.rippleeffect:library:1.2.2' compile 'com.makeramen:roundedimageview:1.4.0'

should most probably read

compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:support-v4:24.2.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.jpardogo.materialtabstrip:library:1.0.6'
compile 'com.github.traex.rippleeffect:library:1.2.2'
compile 'com.makeramen:roundedimageview:1.4.0'
5
  • pls tell me how to fix i bought a code and im willing to edit some database files it and i have no experience in coding :( Sep 7, 2016 at 23:12
  • I already told you. Just fix the error I told you exists and it should work
    – Vampire
    Sep 7, 2016 at 23:15
  • Your comment is missing content
    – Vampire
    Sep 7, 2016 at 23:24
  • if its not can you please edit it for me ill be really thankfull Sep 7, 2016 at 23:39
  • No, 'asdfasdfasdf' is of course a placeholder for your dependencies. Did you even read my answer? Obviously not.
    – Vampire
    Sep 8, 2016 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.