react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

Cannot get property 'supportLibVersion' on extra properties extension as it does not exist

Open speggos opened this issue 7 years ago • 7 comments

Hello,

I am trying to use this library in my project, although I am getting the following error when trying to build on Android:

A problem occurred evaluating project ':react-native-reanimated'.

Cannot get property 'supportLibVersion' on extra properties extension as it does not exist

The project builds fine on iOS.

Any help would be much appreciated, really would love to use this library!

speggos avatar May 10 '19 21:05 speggos

+1 I have this issue too

blohamen avatar May 17 '19 10:05 blohamen

add this code in you android/build.gradle:

/**
 * Project-wide gradle configuration properties for use by all modules
 */
ext {
    compileSdkVersion           = 25
    targetSdkVersion            = 25
    buildToolsVersion           = "25.0.2"
    googlePlayServicesVersion   = "12.0.1"
    supportLibVersion           = "27.0.0"
}

and sync again

tourze avatar May 21 '19 08:05 tourze

add this code in you android/build.gradle:

/**
 * Project-wide gradle configuration properties for use by all modules
 */
ext {
    compileSdkVersion           = 25
    targetSdkVersion            = 25
    buildToolsVersion           = "25.0.2"
    googlePlayServicesVersion   = "12.0.1"
    supportLibVersion           = "27.0.0"
}

and sync again

Ty for answer, this solves issue

blohamen avatar May 21 '19 11:05 blohamen

// face the same issue then I follow @tourze suggestion solved the problem here is my android/build.gradle looks like

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

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

ext {
    compileSdkVersion           = 25
    targetSdkVersion            = 25
    buildToolsVersion           = "25.0.2"
    googlePlayServicesVersion   = "12.0.1"
    supportLibVersion           = "27.0.0"
 }

allprojects {
    repositories {
        google()
        // Add jitpack repository (added by tipsi-stripe)
        maven { url "https://jitpack.io" }
        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"
        }
    }
    subprojects {
        project.configurations.all {
            resolutionStrategy.eachDependency { details ->
                if (details.requested.group == 'com.android.support'
                        && !details.requested.name.contains('multidex') ) {
                    details.useVersion "26.0.1"
                }
                if (details.requested.group == 'com.google.android.gms'
                && !details.requested.name.contains('multidex') ) {
                    details.useVersion "12.0.1"
                }
            }
        }
        // to activate when your SDK is Android P
        afterEvaluate {project ->
            if (project.hasProperty("android")) {
                android {
                    compileSdkVersion 28
                    buildToolsVersion "28.0.3"
                }
            }
        }
    }
}


theredfoxfire avatar Jun 24 '19 04:06 theredfoxfire

It seems. that nothing on my App (as it is migradet to AndroidX) need this supportLibVersion entry, but this react-native-reanimated Component. I use androidXCore = "1.0.2" instead supportLibVersion = "28.0.0" in my android/build.gradle.

Isn't there a way to make react-native-reanimated also work with this above setting?

== OK, I've seen, in the master-branch it seems to changed now... not yet in Version 1.2. (https://github.com/kmagiera/react-native-reanimated/blob/master/android/build.gradle) When does the next build been bundled.

xstable avatar Sep 25 '19 12:09 xstable

One workaround for the time being if you're on RN 0.61, add back supportLibVersion = "28.0.0" to android/build.gradle under buildscript.ext.

AndyShi12 avatar Sep 25 '19 15:09 AndyShi12

I believe this issue was solved by @tourze and #463, so I'm closing it. If you have any further concerns don't hesitate to ask.

jgonet avatar Dec 06 '19 16:12 jgonet