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!
+1 I have this issue too
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
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
// 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"
}
}
}
}
}
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.
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.
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.
Most helpful comment
One workaround for the time being if you're on RN 0.61, add back
supportLibVersion = "28.0.0"toandroid/build.gradleunderbuildscript.ext.