question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

android : Failed to resolve

See original GitHub issue

Environment

Run react-native info in your terminal and paste its contents here.

React Native Environment Info: System: OS: macOS 10.14 CPU: x64 Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 740.27 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.11.2 - /usr/local/bin/node Yarn: 1.10.1 - /usr/local/bin/yarn npm: 5.6.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0 Android SDK: Build Tools: 23.0.1, 23.0.2, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.3, 28.0.3 API Levels: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.0/10A255 - /usr/bin/xcodebuild npmPackages: react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728 react-native: 0.57.3 => 0.57.3 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7

Description

Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.

android

react-native init AwesomeProject

open android studio

err:

The option ‘android.enableAapt2’ is deprecated and should not be used anymore. Use ‘android.enableAapt2=true’ to remove this warning. It will be removed at the end of 2018…

Failed to resolve: support-vector-drawable Open File

Failed to resolve: livedata-core Open File

Failed to resolve: viewmodel Open File

Failed to resolve: common Open File

Failed to resolve: runtime Open File

Reproducible Demo

Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

32reactions
nvelozsavinocommented, Oct 23, 2018

Moving the jcenter repository to the last position fixed the issue for me: in android/build.gradle

before:

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

And after the fix:

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        google()
        jcenter()
    }
}
10reactions
asleepacecommented, Oct 24, 2018

Switching the order of jcenter() and google() didn’t work for me…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle failed to resolve library in Android Studio
You go File->Settings->Gradle Look at the "Offline work" inbox, if it's checked u uncheck and try to sync again I have the same...
Read more >
Question - Android Studio - Failed to resolve the dependencies
Hi, I am trying to implement Unity Mediation in my Android Studio project but when I add the dependencies according to Unity documentation ......
Read more >
Failed to resolve: com.github.AppIntro:AppIntro:6.1.0 #957
The problem is that you need to move the Jitpack repository you declared. Right now you have inside the buildscript{} block. You should...
Read more >
Android Studio “Unable to resolve dependency” Error - Medium
The most of users encounter errors like “Unable to resolve dependency for ':app@debug/ compileClasspath': Could not find any version that ...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix this issue, upgrade your Android 11 emulator to version 9 or higher by navigating to Tools > SDK Manager. In the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found