All of them match the consumer attributes: - Variant 'generalDebugRuntimeElements' capability bluesky_xyc_app:react-native-camera:unspecified: - Unmatched attributes: - Found com.android.build.api.attributes.VariantAttr 'generalDebug' but wasn't required. - Found react-native-camera 'general' but wasn't required. - Compatible attributes: - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - 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'. - Variant 'mlkitDebugRuntimeElements' capability bluesky_xyc_app:react-native-camera:unspecified: - Unmatched attributes: - Found com.android.build.api.attributes.VariantAttr 'mlkitDebug' but wasn't required. - Found react-native-camera 'mlkit' but wasn't required. - Compatible attributes: - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - 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'. * 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.
在android -> app ->bulid.gradle
增加 missingDimensionStrategy 'react-native-camera', 'general'
在defalutConfig中添加此行代码
defaultConfig { applicationId "com.bluesky_xyc_app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" missingDimensionStrategy 'react-native-camera', 'general' }