every second time my app is not run
npx react-native run-android
command has shown this
npm WARN config global --global, --local are deprecated. Use --location=global instead.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1099 file(s) to forward-jetify. Using 2 workers...
info JS server already running.
info Installing the app...
Starting a Gradle Daemon (subsequent builds will be faster)
Configure project :app Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings 6 actionable tasks: 6 up-to-date
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, preferably optimized for Android, 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 myapp1:react-native-camera:unspecified declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - 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 'mlkitDebugRuntimeElements' capability myapp1:react-native-camera:unspecified declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - 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 'generalDebugApiElements' capability myapp1:react-native-camera:unspecified declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'generalReleaseApiElements' capability myapp1:react-native-camera:unspecified: - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a runtime of 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 myapp1: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' - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'mlkitDebugApiElements' capability myapp1:react-native-camera:unspecified declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'mlkitReleaseApiElements' capability myapp1:react-native-camera:unspecified: - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a runtime of 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 myapp1: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' - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android)
- 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.
- Get more help at https://help.gradle.org
BUILD FAILED in 1m 6s
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.bat 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, preferably optimized for Android, 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 myapp1:react-native-camera:unspecified declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - 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 'mlkitDebugRuntimeElements' capability myapp1:react-native-camera:unspecified declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Unmatched attributes: - 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 'generalDebugApiElements' capability myapp1:react-native-camera:unspecified declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'generalReleaseApiElements' capability myapp1:react-native-camera:unspecified: - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a runtime of 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 myapp1: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' - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'mlkitDebugApiElements' capability myapp1:react-native-camera:unspecified declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug': - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android) - Variant 'mlkitReleaseApiElements' capability myapp1:react-native-camera:unspecified: - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a runtime of 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 myapp1: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' - Other compatible attribute: - Doesn't say anything about its target Java environment (preferred optimized for Android)
- 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.
- Get more help at https://help.gradle.org
BUILD FAILED in 1m 6s
at makeError (F:\React Native App\myapp1\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at F:\React Native App\myapp1\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (F:\React Native App\myapp1\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (F:\React Native App\myapp1\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
F:\React Native App\myapp1>
Please Help me