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.

Could not find any version that matches com.android.support:support-v4:27.+

See original GitHub issue

In the current version (4.0.8), after I added the project and linked it (automatically or manually), the compilation always fails with the following message:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-fast-image'.
> Could not resolve all dependencies for configuration ':react-native-fast-image:_debugPublishCopy'.
   > Could not find any version that matches com.android.support:support-v4:27.+.
     Versions that do not match:
         26.0.0-alpha1
         25.3.1
         25.3.0
         25.2.0
         25.1.1
         + 32 more
     Searched in the following locations:
         file:/C:/Users/User/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/maven-metadata.xml
         file:/C:/Users/User/path/android/sdk-manager/com/android/support/support-v4/maven-metadata.xml
         file:/C:/Users/User/path/android/sdk-manager/com/android/support/support-v4/
     Required by:
         MyProject:react-native-fast-image:unspecified

My android/app/build.gradle, has the following settings:

    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "com.myproject"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 10
        versionName "0.0.1"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }

Even though the build.gradle of react-native-fast-image has code that gets the sdk versions from the root-project (def _compileSdkVersion = _ext.has(‘compileSdkVersion’) ? _ext.compileSdkVersion : 27) it does somehow not work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
acuntexcommented, May 3, 2018

You could add the following to android/build.gradle:

project.ext {
    compileSdkVersion = 25
    buildToolsVersion = "25.0.2"
    minSdkVersion = 16
    targetSdkVersion = 22
}

But I’m wondering if I missed something on the way that I need this workaround which is not documented here.

1reaction
DylanVanncommented, May 4, 2018

I’ll try with a new project and see how it goes. If it doesn’t work then yes something needs to be fixed. Otherwise maybe just an instruction for adding the google() repository (I think that’s the change that needs to be made).

https://github.com/facebook/react-native/pull/17741/files#diff-c197962302397baf3a4cc36463dce5eaR21

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio could not find any version that matches com ...
Running a project in Android Studio fails with this error: could not find any version that matches com.android.support:appcompat-v7:+.
Read more >
Could not find any version that matches appcompat v7.30
How to fix Error in Android Studio : could not find any version that matches com. android. support :appcompat-v7:30.+.
Read more >
Support Library Packages - Android Developers
The Android Support Library contains several library packages that can be included in your application. Each of these libraries supports a specific range...
Read more >
Can't build appcompat-v7:21.+ with targetSdkVersion 21 ...
Version of Android Studio (available in the about box): 0.8.13. OS version: OSX Yosemite Java JRE/JDK version: 1.7.0_67. I have created a new...
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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