不能npm安装react-native-workers

时间:2016-09-19 09:52:24

标签: android react-native

我正在尝试安装react-native-workers,但在构建过程中遇到了一堆错误(RN版本 - 0.33.0):

PasswordChanged = new RelayCommand<object>(param => this.GoPasswordChanged());

private void GoPasswordChanged()
{      
}

我注意到那些未找到的符号是从错误的路径导入的(com.facebook.react.bridge),实际上位于com.facebook.react。 cxxbridge < /强>

解决这些问题之后,我最终遇到了一个错误:

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:7: error: cannot find symbol import com.facebook.react.bridge.CatalystInstanceImpl;  symbol:   class CatalystInstanceImpl   location: package com.facebook.react.bridge

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:8: error: cannot find symbol import com.facebook.react.bridge.JSBundleLoader;   symbol:   class JSBundleLoader   location: package com.facebook.react.bridge

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:9: error: cannot find symbol import com.facebook.react.bridge.JSCJavaScriptExecutor;   symbol:   class JSCJavaScriptExecutor   location: package com.facebook.react.bridge

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:10: error: cannot find symbol import com.facebook.react.bridge.JavaScriptExecutor;   symbol:   class JavaScriptExecutor   location: package com.facebook.react.bridge

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:15: error:  cannot find symbol import com.facebook.react.bridge.NativeModuleRegistry;   symbol:   class NativeModuleRegistry   location: package com.facebook.react.bridge

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:28: error: cannot find symbol
    private JSBundleLoader jsBundleLoader;   symbol:   class JSBundleLoader   location: class ReactContextBuilder

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:37: error: cannot find symbol
    public ReactContextBuilder setJSBundleLoader(JSBundleLoader jsBundleLoader) {   symbol:   class JSBundleLoader   location: class ReactContextBuilder

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:137: error: package NativeModuleRegistry does not exist
    private void addNativeModules(ReactApplicationContext reactContext, NativeModuleRegistry.Builder nativeRegistryBuilder) {

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:53: error: cannot find symbol
        JavaScriptExecutor jsExecutor = new JSCJavaScriptExecutor.Factory().create(new WritableNativeMap());   symbol:   class JavaScriptExecutor   location: class ReactContextBuilder

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:53: error: package JSCJavaScriptExecutor does not exist
        JavaScriptExecutor jsExecutor = new JSCJavaScriptExecutor.Factory().create(new WritableNativeMap());

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:62: error: package NativeModuleRegistry does not exist
        NativeModuleRegistry.Builder nativeRegistryBuilder = new NativeModuleRegistry.Builder();

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:62: error: package NativeModuleRegistry does not exist
        NativeModuleRegistry.Builder nativeRegistryBuilder = new NativeModuleRegistry.Builder();

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:69: error: package CatalystInstanceImpl does not exist
        CatalystInstanceImpl.Builder catalystInstanceBuilder = new CatalystInstanceImpl.Builder()

/node_modules/react-native-workers/android/src/main/java/co/apptailor/Worker/core/ReactContextBuilder.java:69: error: package CatalystInstanceImpl does not exist
        CatalystInstanceImpl.Builder catalystInstanceBuilder = new CatalystInstanceImpl.Builder()

14 errors :react-native-workers:compileReleaseJavaWithJavac FAILED

此时我试图将其更改为:

constructor Factory in class Factory cannot be applied to given types;
        JavaScriptExecutor jsExecutor = new JSCJavaScriptExecutor.Factory().create(new WritableNativeMap());
                                        ^
  required: WritableNativeMap
  found: no arguments

构建已经过去,但后来我收到错误说

  

UIManager未定义。本机模块配置可能不正确

我完全迷失在这里,有没有人有这个lib工作? (React native version - 0.33.0,react-native-workers version - 0.3.1)

0 个答案:

没有答案