react-native-qrcode-scanner icon indicating copy to clipboard operation
react-native-qrcode-scanner copied to clipboard

ViewPropTypes is back on React Native 0.71

Open saifulshihab opened this issue 2 years ago • 7 comments

I have created a new react native app with the latest version 0.71. And using this package to implement QR code scan feature on my app. Scanning works fine. But need to fix this warning. image

saifulshihab avatar Jan 18 '23 08:01 saifulshihab

@saifulshihab Did you use 'react-native-camera' because it is deprecated.

musabsengul avatar Jan 23 '23 07:01 musabsengul

Yes, what's the alternative??

saifulshihab avatar Jan 23 '23 07:01 saifulshihab

@saifulshihab I know there is no alternative. I am also trying to use this but i am getting error like this on android

`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, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.1'. 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 courier:react-native-camera:unspecified declares an API of a component, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Provides attribute 'com.android.build.api.attributes.ProductFlavor:react-native-camera' with value 'general' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'generalDebug' but the consumer didn't ask for it - Doesn't say anything about its target Java environment (preferred optimized for Android) - Provides attribute 'react-native-camera' with value 'general' but the consumer didn't ask for it - Variant 'mlkitDebugApiElements' capability courier:react-native-camera:unspecified declares an API of a component, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - Provides attribute 'com.android.build.api.attributes.ProductFlavor:react-native-camera' with value 'mlkit' but the consumer didn't ask for it - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'mlkitDebug' but the consumer didn't ask for it - Doesn't say anything about its target Java environment (preferred optimized for Android) - 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 courier:react-native-camera:unspecified declares an API of a component, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.1': - 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' - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'generalReleaseRuntimeElements' capability courier:react-native-camera:unspecified declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.1': - 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' - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'mlkitReleaseApiElements' capability courier:react-native-camera:unspecified declares an API of a component, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.1': - 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' - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'mlkitReleaseRuntimeElements' capability courier:react-native-camera:unspecified declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.1': - 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' - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) `

musabsengul avatar Jan 23 '23 08:01 musabsengul

@musabsengul I have same issue on Android ... how to solve this issue?

JJalit avatar Jan 27 '23 10:01 JJalit

@JJalit

I've followed these steps: https://react-native-camera.github.io/react-native-camera/docs/installation#manual-install---android-not-recommended

musabsengul avatar Jan 27 '23 11:01 musabsengul

any updates any solutions?

ahmedfouad01099 avatar Jan 27 '23 17:01 ahmedfouad01099

I solved this issue. I followed this

add this line to android/app/build.gralde defaultConfig missingDimensionStrategy 'react-native-camera', 'mlkit'

JJalit avatar Jan 30 '23 07:01 JJalit