skip to Main Content

I have added react-native-camera to my application. But I am getting this error while running npm run android command.

* What went wrong:
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-async-storage_async-storage.
     Required by:
         project :app
      > No matching configuration of project :react-native-async-storage_async-storage was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'react-native-camera' with value 'general' but:
          - None of the consumable configurations have attributes.

I have made all the required changes to build.gradle and settings.gradle. I am running react-native 0.64.0 version and node 16.4.2 version.

2

Answers


  1. Chosen as BEST ANSWER

    As @Cory Cunningham mentioned, it was because of async storage. So I installed the following version of @react-native-async-storage/async-storage

    "@react-native-async-storage/async-storage": "^1.17.5",
    

  2. Your error has more to do with the async storage library it seems, as indicated on the error. So I would check that implementation first.

    Second, I would advise against using react-native-camera since it has been deprecated for a while now. Most people seem to have moved to react-native-vision-camera or react-native-camera-kit (which I use and would suggest).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search