不变违规:requireNativeComponent:在UIManager react native中找不到AIRMap

Ade*_*uza 5 reactjs react-native react-native-maps

我正在使用React Native,并且在我的应用程序上需要一个Map,为此,我正在尝试使用react-native-maps。但是,当我安装它并尝试使用它时,出现了以下红色屏幕:

在此处输入图片说明

在此链接中,我已经按照所有步骤进行安装和示例了:

https://github.com/react-community/react-native-maps

我的视图代码没什么错,但是配置中可能缺少某些东西。

这是我的环境:

"react-native-maps": "github:react-community/react-native-maps"
"react": "16.5.0"
"react-native": "0.57.0"
Run Code Online (Sandbox Code Playgroud)

我使用github链接添加react-native-maps,因为有人在react-native-maps的“问题”页面中说过这(这是一个协作者说的链接> https://github.com/ react-community / react-native-maps / issues / 2539#issuecomment-428291213 <),但是即使这样做也不起作用。

我忘了提到链接lib时发生的情况:

FAILURE: Build failed with an exception.

* What went wrong: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\47.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\50.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\35.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\41.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\38.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\44.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\53.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\3.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\21.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\26.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\18.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\8.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\27.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\12.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\25.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\4.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\9.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\14.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\22.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\17.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\1.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\13.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\5.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\0.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\23.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\16.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\29.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\6.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\10.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\19.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\20.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\2.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\24.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\11.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\7.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\28.jar, D:\Projetos\atitur\android\app\build\intermediates\transforms\dexBuilder\debug\15.jar Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. Program type already present: android.support.v4.app.ActionBarDrawerToggle$Delegate

* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 33s 48 actionable tasks: 24 executed, 24 up-to-date Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html
Run Code Online (Sandbox Code Playgroud)