Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

ViewPropTypes is back on React Native 0.71 #404

Open
saifulshihab opened this issue Jan 18, 2023 · 7 comments
Open

ViewPropTypes is back on React Native 0.71 #404

saifulshihab opened this issue Jan 18, 2023 · 7 comments

Comments

@saifulshihab
Copy link

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

@musabsengul
Copy link

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

@saifulshihab
Copy link
Author

Yes, what's the alternative??

@musabsengul
Copy link

@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)
`

@JJalit
Copy link

JJalit commented Jan 27, 2023

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

@musabsengul
Copy link

musabsengul commented Jan 27, 2023

@ahmedfouad01099
Copy link

any updates
any solutions?

@JJalit
Copy link

JJalit commented Jan 30, 2023

I solved this issue.
I followed this

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants