小编Mis*_*abu的帖子

React Native AWS 位置

我正在尝试创建一个移动应用程序并使用AWS位置跟踪器。我有以下代码:

import React from 'react';
import AWS from 'aws-sdk/dist/aws-sdk-react-native';

export default function App() {
  const client = new AWS.Location({
    region: 'eu-west1',
    credentials: {
         ...
    }
  })
  return (
    <View style={styles.container}>
      <Text> Altitude</Text>
    </View>
  );
}
const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});
Run Code Online (Sandbox Code Playgroud)

我遇到了一个我以前从未遇到过的致命错误。

<--- Last few GCs --->

[33230:0x561df76b3e60]    55471 ms: Mark-sweep 1965.5 (2085.9) -> 1961.2 (2092.1) MB, 4608.8 / 0.0 ms  (average mu = 0.536, current mu = 0.059) allocation …
Run Code Online (Sandbox Code Playgroud)

javascript heap-memory amazon-web-services react-native expo

5
推荐指数
0
解决办法
310
查看次数

使用 let 解析错误(可能是不正确的缩进或不匹配的括号)

我得到

解析错误(可能不正确的缩进或不匹配的括号)

在线与 | i > j = do swap axs p j

apartition :: Ord a => STArray s Int a -> Int -> Int -> ST s Int
apartition axs p q = do 
  x <- readArray axs p
  let loop i j
    | i > j = do swap axs p j
                 return j
    | otherwise = do u <- readArray axs i
                     if u < x 
                       then do loop (i + 1) j 
                       else do swap …
Run Code Online (Sandbox Code Playgroud)

haskell compiler-errors parse-error

2
推荐指数
1
解决办法
45
查看次数