Eme*_*pes 1 react-native react-native-ios
该应用程序反应本机应用程序在模拟器上编译一切正常,但是当我尝试从 xcode 在我的 iphone 上运行它时,我收到以下错误:
语义问题:
1 - 'MethodDescriptor' 的重新定义 - 在路径/react-native/ReactCommon/cxxreact/ModuleRegistry.cpp:10 中包含的文件中:
2 - 'NativeModule' 的重新定义 - 1. 在 react-path/native/ReactCommon/cxxreact/ModuleRegistry.cpp:10 包含的文件中:
React-cxxreact/NativeModule.h 上的代码
// Copyright (c) Facebook, Inc. and its affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#pragma once
#include <string>
#include <vector>
#include <folly/Optional.h>
#include <folly/dynamic.h>
namespace facebook {
namespace react {
struct MethodDescriptor {
std::string name;
// type is one of js MessageQueue.MethodTypes
std::string type;
MethodDescriptor(std::string n, std::string t)
: name(std::move(n))
, type(std::move(t)) {}
};
using MethodCallResult = folly::Optional<folly::dynamic>;
class NativeModule {
public:
virtual ~NativeModule() {}
virtual std::string getName() = 0;
virtual std::vector<MethodDescriptor> getMethods() = 0;
virtual folly::dynamic getConstants() = 0;
virtual void invoke(unsigned int reactMethodId, folly::dynamic&& params, int callId) = 0;
virtual MethodCallResult callSerializableNativeHook(unsigned int reactMethodId, folly::dynamic&& args) = 0;
};
Run Code Online (Sandbox Code Playgroud)
} }
| 归档时间: |
|
| 查看次数: |
1728 次 |
| 最近记录: |