React Native 集成 react-native-camera 安卓编译运行时报错
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve project :react-native-camera.
     Required by:
         project :app
      > The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'. However we cannot choose between the following variants of project :react-native-camera:
          - generalDebugApiElements
          - mlkitDebugApiElements
        All of them match the consumer attributes:
          - Variant 'generalDebugApiElements' capability lishiShengwu:react-native-camera:unspecified declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
              - Unmatched attributes:
                  - Provides attribute 'com.android.build.api.attributes.VariantAttr' with value 'generalDebug' but the consumer didn't ask for it
                  - Provides attribute 'react-native-camera' with value 'general' but the consumer didn't ask for it
          - Variant 'mlkitDebugApiElements' capability lishiShengwu:react-native-camera:unspecified declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
              - Unmatched attributes:
                  - Provides attribute 'com.android.build.api.attributes.VariantAttr' with value 'mlkitDebug' but the consumer didn't ask for it
                  - Provides attribute 'react-native-camera' with value 'mlkit' but the consumer didn't ask for it
        The following variants were also considered but didn't match the requested attributes:
          - Variant 'generalReleaseApiElements' capability lishiShengwu:react-native-camera:unspecified declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
          - Variant 'generalReleaseRuntimeElements' capability lishiShengwu:react-native-camera:unspecified declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
          - Variant 'mlkitReleaseApiElements' capability lishiShengwu:react-native-camera:unspecified declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
          - Variant 'mlkitReleaseRuntimeElements' capability lishiShengwu:react-native-camera:unspecified declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'


1150
0
3年前