Execution failed for task ':app:checkDevDebugAarMetadata'

Viewed 2326

What went wrong:
Execution failed for task ':app:checkDevDebugAarMetadata'.

Could not resolve all files for configuration ':app:devDebugRuntimeClasspath'. Could not resolve net.minidev:json-smart:[1.3.1,2.3]. Required by: project :app > project :react-native-code-push > com.nimbusds:nimbus-jose-jwt:5.1 > Failed to list versions for net.minidev:json-smart. > Unable to load Maven meta-data from https://jcenter.bintray.com/net/minidev/json-smart/maven-metadata.xml. > Could not HEAD 'https://jcenter.bintray.com/net/minidev/json-smart/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message)

i am getting above error while building project . unable to resolve it please help me out.

4 Answers

Try to fix it by changing in react-native-code-push

node-module/react-native-code-push/android/app/build.gradle

edit line

implementation('com.nimbusds:nimbus-jose-jwt:5.1') 

to

implementation('com.nimbusds:nimbus-jose-jwt:5.1') 
 { exclude group: "net.minidev", module: "json-smart" }

Try another Solution if the above don't work

Complete Solution Stack

Adding MavenCentral() to the Android build.gradle IMO is a cleaner solution and it worked for me!

repositories {
        google()
        mavenLocal()
        mavenCentral()

It save my life :D, with react native 0.59 & codepush 5.6

implementation('com.nimbusds:nimbus-jose-jwt:5.1') { exclude group: "net.minidev", module: "json-smart" }

"react-native": "^0.63.3" & "react-native-code-push": "6.4.0" This solution works: /node_modules/react-native-code-push/android/app/build.gradle Change to: implementation('com.nimbusds:nimbus-jose-jwt:5.1') { exclude group: "net.minidev", module: "json-smart" }

Related