Cannot run React Native Project on Android Device or Simulator with React-Native-Maps dependency

309 views Asked by At

I am currently trying to build and run my project on android but it keeps failing. I followed all the instructions for setting up the android environment correctly, as I am able to get my other applications to work on the simulator. I am using the React native maps dependency on this project, and for some reason whenever I run react-native run-android it crashes with this error: error: constructor ActionSheetPackage in class ActionSheetPackage cannot be applied to given types; new ActionSheetPackage() ^ required: FragmentActivity found: no arguments reason: actual and formal argument lists differ in length 1 error :app:compileDebugJavaWithJavac FAILED
Followed by: What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details.

I've tried troubleshooting using what can be found on the react-native-maps github page, and none of that seems to work. Does anyone have any ideas?

1

There are 1 answers

0
user3413380 On

It turns out that the issue was that there was a dependency that did not work on android. When I npm installed the dependency it also installed it's self in the android portion of the project. Once I removed it from there it worked like a charm.