The module I am trying to install is react-native-schedule-sms
The SchduleSMSDemo project provided in the react-native-schedule-sms app repository builds & runs fine without any issue
My App Name is birthdayReminder
& the complete error is
Scanning 734 folders for symlinks in /Volumes/Coding/Code/ReactNative/birthdayReminder/node_modules (13ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.
* Where:Build file '/Volumes/Coding/Code/ReactNative/birthdayReminder/node_modules/react-native-schedule-sms/android/build.gradle' line: 17
* What went wrong:
A problem occurred evaluating project ':react-native-schedule-sms'.> Could not find method implementation() for arguments [com.facebook.react:react-native:+] on objectof type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 7.77 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
I have realm
as a native dependency & react-native-schedule-sms
& both are in settings.gradle
I did react-native link
after installing both & the app works fine if I remove react-native-schedule-sms
settings.gradle
rootProject.name = 'birthdayReminder'
include ':realm'
project(':realm').projectDir = new File(rootProject.projectDir, '../node_modules/realm/android')
include ':react-native-schedule-sms'
project(':react-native-schedule-sms').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-schedule-sms/android')
include ':app'
android/app/build.gradle
dependencies {
compile project(':realm')
compile project(':react-native-schedule-sms')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}