0

I want install realm localDb with react-native but after install this package in npm project not run with this command react-native run-android,

Task :app:mergeDexDebug FAILED I don't know what is mean this error !!!

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0

Project Setting

defaultConfig {
    applicationId "com.olyaaqarat"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 1
    versionName "1.0"
}

 buildscript {
    ext {
        buildToolsVersion = "29.0.2"
        minSdkVersion = 16
        compileSdkVersion = 29
        targetSdkVersion = 29
    }
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:3.5.3")
    }
}

$ react-native -v
react-native-cli: 2.0.1
react-native: 0.63.2

Android Gradle version Gradle 6.7

Test Device

Real devoice android 9

I look this answer but not help me !!! Deprecated Gradle features were....

Zanyar Jalal
  • 1,407
  • 12
  • 29
  • Please match your Gradle plugin with the correct Gradle version see here https://developer.android.com/studio/releases/gradle-plugin – ecle Oct 17 '20 at 04:34
  • 1
    Does this answer your question? [Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0](https://stackoverflow.com/questions/51610420/deprecated-gradle-features-were-used-in-this-build-making-it-incompatible-with) – Sweta Jain Sep 20 '21 at 15:39

1 Answers1

0

You may want to try updating your dependencies gradle. I've been using 4.0.1 and it's been working pretty well with the newer version of react native.

    dependencies {
    classpath("com.android.tools.build:gradle:4.0.1")
}

It should work with your current build tooks and sdk versions.

sleepyyz
  • 1
  • 1