react-native-linear-gradient build error

Android build failed

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred evaluating project ':react-native-linear-gradient'.

> Could not find method compileOnly() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.


Solution:

Fixed by changing version of react-native-liniear-gradient in packages.json to "2.4.0"

你可能感兴趣的:(react-native-linear-gradient build error)