prscX / react-native-shine-button

React Native: Native Shine Button - Effects like shining
Apache License 2.0
357 stars 37 forks source link

Could not find method google() for arguments [] on repository container. #14

Closed adirzoari closed 6 years ago

adirzoari commented 6 years ago

after install plugin I get this error

Could not find method google() for arguments [] on repository container.

my build.gradle android

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

buildscript {
    repositories {
        jcenter()
                google()
        maven { url "https://jitpack.io" }

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

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

allprojects {
    repositories {
        mavenLocal()
        jcenter()
                google()

        maven {
                   url "https://jitpack.io"

            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}
prscX commented 6 years ago

Thanks @adirzoari for raising the issue.

Basically google() is support on a specific gradle and android version. For can you please change below line in react-native-shine-button/android/build.gradle

google() -> maven { url "https://maven.google.com" }

I will be pushing a release with the fix. For now please use above solution.

Thanks </ Pranav >

adirzoari commented 6 years ago

Hey prscx, it still not working, that's my update build.gradle

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

buildscript { repositories { jcenter() maven { url "https://maven.google.com" } maven { url "https://jitpack.io" }

}
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'

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

}

allprojects { repositories { mavenLocal() jcenter() maven { url "https://maven.google.com" }

    maven {
               url "https://jitpack.io"

        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url "$rootDir/../node_modules/react-native/android"
    }
}

} `

I get same error.

prscX commented 6 years ago

Hi @adirzoari: Same change you need to do in library build.gradle as well.

Let me know incase it does not work.

Thanks </ Pranav >

prscX commented 6 years ago

Hi @adirzoari: I have a release with the fix. Can you please upgrade the library to latest version.

Please let me know incase you still face the same issue.

V0.0.12

Thanks </ Pranav >

prscX commented 6 years ago

Hi @adirzoari: Hope the issue was resolved using the latest version.

Can I please close the issue, if it was resolved.

Thanks </ Pranav >