Async-storage: Could not resolve project :@react-native-community_async-storage

Created on 13 Jun 2019  Â·  14Comments  Â·  Source: react-native-async-storage/async-storage

You want to:

Hello,
I'm using RN 0.59.9 and async-storage 1.4.2 but not working on android. Build failed with following error.

FAILURE: Build failed with an exception.

Screenshot:
image

.build.gradle
image

Android question

Most helpful comment

Update file android/build.gradle
Replace maven { url "https://jitpack.io" } to maven { url "https://www.jitpack.io" }.
I guess it will help someone

All 14 comments

How did you link AsyncStorage? Did you follow this this guide?

How did you link AsyncStorage? Did you follow this this guide?

Yes. I have double-check for link steps.

I found solution and now it's working. Before i using yarn install packager.
npm install @react-native-community/async-storage --save

This issue still presists and i have double checked all the linking steps they are all fine. Please can anyone help with this issue

MY Package.json [Dependencies]

"dependencies": {
"@react-native-community/async-storage": "^1.5.0",
"native-base": "^2.12.1",
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-gesture-handler": "^1.3.0",
"react-native-modal-datetime-picker": "^7.5.0",
"react-native-push-notification": "^3.1.3",
"react-navigation": "^3.11.0"
},
"devDependencies": {
"@babel/core": "7.4.5",
"@babel/runtime": "7.4.5",
"babel-jest": "24.8.0",
"jest": "24.8.0",
"metro-react-native-babel-preset": "0.54.1",
"react-test-renderer": "16.8.3"
},

Screenshot from 2019-07-01 14-37-05

Hey @SdSalaat

Your issue is related to Gradle. Name or service not know is related to your network/DNS resolution. Make sure your network is fine, clean build and try again.

hi @Krizzu if you please can you define some steps

This is a new issue of comunity / asyncstorage that has not been resolved. You can use the default way of react natieve modules

You try delete comunity/asyncstorage and use AsyncStorage from React Native

@systemis This is not AsyncStorage issue.

@SdSalaat I don't know exactly your setup, so can't really help here. Do you use a proxy?

@Krizzu yes i do but it is turned off

@Krizzu yes i do but it is turned off

Are you check following URLs ? Maybe you can download it directly.
Screen Shot 2562-07-04 at 18 13 55

@SdSalaat What repositories have you got in project build.gradle?

@ankha0109 I can't download this:https://repo.maven.apache.org/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom
It returns to 404
Error I got when I executed. / gradlew assemble Release,How to repair it?
`* What went wrong:
Could not determine the dependencies of task ':@react-native-community_async-storage:extractReleaseAnnotations'.

Could not resolve all task dependencies for configuration ':@react-native-community_async-storage:lintClassPath'.
Could not resolve com.android.tools.lint:lint-gradle:26.4.1.
Required by:
project :@react-native-community_async-storage
Could not resolve com.android.tools.lint:lint-gradle:26.4.1.
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not resolve com.android.tools.lint:lint-gradle:26.4.1.
Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not resolve com.android.tools.lint:lint-gradle:26.4.1.
Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  • 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings`

The same problem

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':@react-native-community_async-storage:extractReleaseAnnotations'.
> Could not resolve all task dependencies for configuration ':@react-native-community_async-storage:lintClassPath'.
   > Could not resolve org.bouncycastle:bcpkix-jdk15on:1.56.
     Required by:
         project :@react-native-community_async-storage > com.android.tools.lint:lint-gradle:26.4.1 > com.android.tools:sdk-common:26.4.1
         project :@react-native-community_async-storage > com.android.tools.lint:lint-gradle:26.4.1 > com.android.tools.build:builder:3.4.1
         project :@react-native-community_async-storage > com.android.tools.lint:lint-gradle:26.4.1 > com.android.tools.build:builder:3.4.1 > com.android.tools.build:apkzlib:3.4.1
      > Could not resolve org.bouncycastle:bcpkix-jdk15on:1.56.
         > Could not get resource 'https://jitpack.io/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.pom'.
            > Could not HEAD 'https://jitpack.io/org/bouncycastle/bcpkix-jdk15on/1.56/bcpkix-jdk15on-1.56.pom'. Received status code 522 from server: Origin Connection Time-out
   > Could not resolve org.bouncycastle:bcprov-jdk15on:1.56.
     Required by:
         project :@react-native-community_async-storage > com.android.tools.lint:lint-gradle:26.4.1 > com.android.tools:sdk-common:26.4.1
         project :@react-native-community_async-storage > com.android.tools.lint:lint-gradle:26.4.1 > com.android.tools.build:builder:3.4.1
         project :@react-native-community_async-storage > com.android.tools.lint:lint-gradle:26.4.1 > com.android.tools.build:builder:3.4.1 > com.android.tools.build:apkzlib:3.4.1
      > Could not resolve org.bouncycastle:bcprov-jdk15on:1.56.
         > Could not get resource 'https://jitpack.io/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom'.
            > Could not HEAD 'https://jitpack.io/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom'. Received status code 522 from server: Origin Connection Time-out

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

android/build.gradle

dependencies {
        classpath("com.android.tools.build:gradle:3.4.1")
....

"@react-native-community/async-storage": "1.6.2"

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 2.43 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
    Yarn: 1.19.0 - /usr/local/bin/yarn
    npm: 6.11.3 - ~/.nvm/versions/node/v10.15.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
    Android SDK:
      API Levels: 16, 21, 22, 23, 24, 25, 26, 27, 28
      Build Tools: 23.0.1, 23.0.2, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.3, 29.0.2
      System Images: android-23 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 11.0/11A420a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.5 => 0.60.5 
  npmGlobalPackages:
    react-native-clean-project: 3.2.4
    react-native-cli: 2.0.1

III opened a proxy, repeatedly installed certificates, can not package successfully, and finally re-installed the Windows system, and finally packaged successfully.

Update file android/build.gradle
Replace maven { url "https://jitpack.io" } to maven { url "https://www.jitpack.io" }.
I guess it will help someone

Was this page helpful?
0 / 5 - 0 ratings