android - null is not an object (evaluating 'nativeInterface.configure') in a React-Native app
问题描述
I'm working on making this React Native
app work on Android
. It's already working on iOS
.
I've encountered the following error and have no clue where to start looking.
As far as I can understand it's an issue with firebase
but not much else is clear. Here is the firebase
and react-native
versions:
"react-native": "0.62.2",
"firebase": "^7.16.1",
"react-native-location": "^2.5.0"
I've ran rm -rm node_modules && npm i
, also cleaned and rebuild the Android project but to no avail.
Edit: After some investigation, the nativeInterface.configure
is called in react-native-location
, index.js
, line 53:
exports.configure = function (options) {
return nativeInterface.configure(options);
};
Edit 2: From logcat
you can see that this error occurs right after this one:
020-07-19 21:07:37.884 7994-8029/? E/unknown:ReconnectingWebSocket: Error occurred, shutting down websocket connection: Websocket exception
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:215)
解决方案
好吧,你知道什么……我跑了react-native link react-native-location
,然后就修好了。
推荐阅读
- neural-network - 如何根据示例数量确定深度 NN 训练的架构?
- gridview - 如何将第一条记录添加到 Telerik Radgrid
- r - 正则表达式提取子域
- python-3.x - Seaborn箱线图四分位数计算
- powerbi - 带有 Azure Data Lake Store 的 Power BI Desktop?
- elixir - Elixir - Phoenix - Ecto 术语
- google-cloud-dataflow - Apache Beam TextIO.read 然后合并成批处理
- ruby-on-rails - 在 Rails 5 中选择特定属性
- xml - GET_SEARCH_RESULTS 网络服务响应说 valid QueryText
- javascript - 在 REPL 中更改节点对象的表示