🤳
react-native-camera が動かない(android)
インストール
- ↑の手順でやってみる
- そもそも
pod
がない。 - cocoapods 入れるもんなのか…?
- そもそも
-
react-native link react-native-camera
もやったけどダメそう
起きたこと
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :react-native-camera.
Required by:
project :app
> The consumer was configured to find a runtime 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:
- generalDebugRuntimeElements
- mlkitDebugRuntimeElements
All of them match the consumer attributes:
- Variant 'generalDebugRuntimeElements' capability myReactNativeApp:react-native-camera:unspecified declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug':
....
解決
- ↑を参考に
android/build.gradle
,android/app/build.gradle
を編集 - よくよく見てみたら書いてありました🙇(ちゃんと読むようにします…
Discussion