React-native-camera error when compiling android : <p>I tried to upgrade my react native project to the newest version (0.59.2). Unfortunately, now when trying to run react-native run-android im getting this error:</p>

<pre><code>Could not determine the dependencies of task ':app:preDebugBuild'.
&gt; Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
&gt; Could not resolve project :react-native-camera.
 Required by:
     project :app
  &gt; Cannot choose between the following variants of project :react-native-camera:
      - generalDebugRuntimeElements
      - mlkitDebugRuntimeElements
    All of them match the consumer attributes:
      - Variant 'generalDebugRuntimeElements':
          - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
          - Found com.android.build.api.attributes.VariantAttr 'generalDebug' but wasn't required.
          - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
          - Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
          - Found react-native-camera 'general' but wasn't required.
      - Variant 'mlkitDebugRuntimeElements':
          - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
          - Found com.android.build.api.attributes.VariantAttr 'mlkitDebug' but wasn't required.
          - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
          - Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.
          - Found react-native-camera 'mlkit' but wasn't required.
</code></pre>

<p>I have already tried to create a new project however this results in the same error.
Reinstalling the node modules didn't help either.
On iOS it works fine.</p>
