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 resolve com.android.tools.build:gradle:3.0.0' error #18180

Closed
ghost opened this issue Mar 4, 2018 · 2 comments
Closed

'Could not resolve com.android.tools.build:gradle:3.0.0' error #18180

ghost opened this issue Mar 4, 2018 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ghost
Copy link

ghost commented Mar 4, 2018

react-native run-android throws 'Could not resolve com.android.tools.build:gradle:3.0.0'
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-camera'.
> Could not resolve all dependencies for configuration ':react-native-camera:classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.0.
Required by:
s7sportsApp:react-native-camera:unspecified
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Permission denied: connect
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not GET 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Permission denied: connect

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Here is my build.gradle file

buildscript {
    repositories {
        jcenter()
    }
    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 {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url "https://jitpack.io"
        }
    }
}

Environment

Environment:
OS: Windows 10
Node: 8.9.3
Yarn: 1.3.2
npm: 5.5.1
Watchman: Not Found
Xcode: N/A
Android Studio: AI-171.4443003

Packages: (wanted => installed)
react: 16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.0 => 0.54.0

Expected Behavior

Install the app in my phone like it did in my work computer

Actual Behavior

BUILD FAILED

Steps to Reproduce

  1. react-native init App-name
  2. add react-native-camera 1.0.1
  3. add react-native-qrcode-scanner 0.0.30
  4. Add react native base
@hramos
Copy link
Contributor

hramos commented Mar 5, 2018

This is being reverted on master now.

@hramos hramos closed this as completed Mar 5, 2018
@Xing-He
Copy link

Xing-He commented Mar 8, 2018

I fixed this by com.android.tools.build:gradle:3.0.1

@facebook facebook locked as resolved and limited conversation to collaborators Mar 5, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants