Java 在React Native中安装本机模块后未生成应用程序?

Java 在React Native中安装本机模块后未生成应用程序?,java,android,android-studio,react-native,react-native-android,Java,Android,Android Studio,React Native,React Native Android,我尝试安装的模块是 应用程序存储库中提供的项目构建和运行良好,没有任何问题 我的应用程序名为birthdayememployer&完整错误为 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

我尝试安装的模块是

应用程序存储库中提供的项目构建和运行良好,没有任何问题

我的应用程序名为birthdayememployer&完整错误为

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
我将realm作为本机依赖项&react native schedule sms&两者都在settings.gradle中

我确实在安装了这两个程序后使用了react-native链接&如果我删除react-native schedule sms,应用程序可以正常工作

格雷德尔酒店 android/app/build.gradle
根据这个问题:


这可能是模块的梯度问题,而不是你的。尝试检查第17行的“/node\u modules/react native schedule sms/android/build.gradle”文件。检查它是否使用“实现”而不是“编译”。如果有,请更换。

有时,react native link无法完全链接模块。您是否检查了MainApplication.java文件以查看它是否正确导入?如果不是,你需要自己写。我还遇到了一些问题,在安装模块后,我需要在应用程序正常运行之前进行清理和重建。No。MainApplication.java还可以。另外,我卸载并重新安装了所有东西可能10次或更多次,所以这不是问题所在。是的,它使用的是实现&我使用的是compileAwesome,谢谢它工作了…2小时后收到了非常感谢
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'
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
}