Build failing with 'Could not find method google() for arguments [] on repository container'
See original GitHub issueMessage shown in console after react-native run-android
:
Building and installing the app on the device (cd android && ./gradlew installDebug)...
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/jskidd3/Desktop/Apps/AppName/node_modules/react-native-svg/android/build.gradle' line: 4
* What went wrong:
A problem occurred evaluating project ':react-native-svg'.
> Could not find method google() for arguments [] on repository container.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I installed the plugin in a fresh project on OSX. Versions:
react-native-cli: 2.0.1
react-native: 0.52.0
Android Studio: 3.0.1
My package.json looks like this:
{
"name": "AppName",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.2.0",
"react-native": "0.52.0",
"react-native-svg": "^6.0.1-rc.3",
"react-native-vector-icons": "^4.5.0"
},
"devDependencies": {
"babel-jest": "22.1.0",
"babel-preset-react-native": "4.0.0",
"jest": "22.1.4",
"react-test-renderer": "16.2.0"
},
"jest": {
"preset": "react-native"
}
}
Any ideas as to how I can fix this?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:35
- Comments:34
Top Results From Across the Web
How to fix "ERROR: Could not find method google() for ...
This error is sometimes generated when you try to run a project created using an older version of Flutter than the one you're...
Read more >Could not find method google() for arguments [] on repository ...
But during compilation we are getting below error message in console. FAILURE: Build failed with an exception.
Read more >Build failing with 'Could not find method google() for ... - GitHub
No worries. You can find it in appName/android/app/build.gradle where appName is the root of your project.
Read more >Could not find method google() for arguments [] on repository ...
My gradle file // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() ...
Read more >Fix "Error Could not find method implementation() for ...
Implementation is a dependency configuration used for library declaration and was introduced in the Android Gradle Plugin 3.0 by Google.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Make sure you have v4.1 of the gradle wrapper as well: https://github.com/msand/SVGPodTest/blob/master/android/gradle/wrapper/gradle-wrapper.properties
Try changing to this: