0

I have a React Native app, which works fine on emulators. I'm trying to build its APK file. I followed this tutorial for the same.

However when I run the command ./gradlew assembleRelease I get this error:

FAILURE: Build failed with an exception.

* What went wrong: Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all task dependencies for configuration ':app:lintClassPath'.
   > Could not resolve com.android.tools.lint:lint-gradle:26.5.3.
     Required by:
         project: app
      > Could not resolve com.android.tools.lint:lint-gradle:26.5.3.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.5.3/lint-gradle-26.5.3.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.5.3/lint-gradle-26.5.3.pom'.
               > Connect to dl.google.com:443 [dl.google.com/2404:6800:4009:80a:0:0:0:200e] failed: Network is unreachable (connect failed)

* 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 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 8s

I searched around for the solution and found this StackOverflow question, whose answer provides the pom file.

But I don't know where to put it.

How do I resolve this error?

RishiC
  • 768
  • 1
  • 10
  • 34
  • when you run assembleRelease your third part librarirs in build.gradle file should be saved in pom file. – Mustafo aka Shokhrukh Makmudov Sep 01 '20 at 08:18
  • //The publication doesn't know about our dependencies, so we have to manually add them to the pom here is the link you can find more info about pom and how to configure it into your project. https://docs.gradle.org/current/userguide/publishing_maven.html – Mustafo aka Shokhrukh Makmudov Sep 01 '20 at 08:23
  • just like the answer suggested: https://stackoverflow.com/a/48438866/5560248 – Tarik Chakur Sep 01 '20 at 08:25
  • Thanks, @TarikChakur, it worked. I got a duplicate resources error after that, but I resolved it following instructions [here](https://medium.com/@shreyasnisal/duplicate-resources-error-react-native-0-60-2200aa18d3e5) – RishiC Sep 01 '20 at 09:55

0 Answers0