Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Crash app #25

Open
sajadspeed opened this issue Oct 23, 2021 · 2 comments
Open

Crash app #25

sajadspeed opened this issue Oct 23, 2021 · 2 comments

Comments

@sajadspeed
Copy link

I following your documentation but android app not run and crash.

App.js

import React from 'react';
import { SafeAreaView, StyleSheet, View} from 'react-native';
import Mapir from 'mapir-react-native-sdk'

const App = () => {
	
	return (
		<SafeAreaView style={styles.container}>
			<View style={styles.container}>
				<Mapir
				apiKey={'****'}
				onRegionDidChange={(e) => onRegionDidChange(e)}
				style={styles.container}
				>
				<Mapir.Camera
					zoomLevel={13}
					centerCoordinate={[51.422548, 35.732573]}
				/>
				</Mapir>
			</View>
		</SafeAreaView>
	);
}
  
const styles = StyleSheet.create({
	container: {
		flex: 1,
	},
});
  

export default App;

  • "react": "17.0.2"
  • "react-native": "0.66.1"
@sajadspeed
Copy link
Author

Also some warnings show to me:

 WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
 WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.
 WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
 WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.

@ReyhaneMasumi
Copy link
Member

As mentioned in docs, this SDK supports RN < 0.62.2. So there is the possibility of errors for other versions. However, you can check the logcat in Android Studio to find out the reason for crashing!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants