0

I'm trying to add react-native-linear-gradient to my project following these instructions but after adding the dependency to the app/build.gradle file and tried to sync the project I got this error

Error:Project :app declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :react-native-linear-gradient.

May be someone have any ideas what I'm doing wrong? Thanks.

UPDATE :

This my app/build.gradle file

dependencies {
    compile project(':react-native-svg')
    compile project(':react-native-linear-gradient')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
}

and this is my settings.gradle file:

rootProject.name = 'DuluxTradePoints'
include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
include ':react-native-linear-gradient'
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')
include ':app'
Abdennacer Lachiheb
  • 4,388
  • 7
  • 30
  • 61

0 Answers0