1

I created a project with react native 0.64.0 but before adding any module or code I am not able to sync the Gradle project or run it This message is being showing me after syncing the gradle

    FAILURE: Build completed with 7 failures.
    
    1: Task failed with an exception.
    -----------
    * What went wrong:
    Execution failed for task ':app:checkDebugAarMetadata'.
    > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
       > Could not find androidx.swiperefreshlayout:swiperefreshlayout:1.0.0.
         Searched in the following locations:
           - https://repo.maven.apache.org/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom
           - file:/Users/amirrezabehrouzi/.m2/repository/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom
           - file:/Users/amirrezabehrouzi/testChart2/node_modules/react-native/android/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom
           - file:/Users/amirrezabehrouzi/testChart2/node_modules/jsc-android/dist/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom
           - https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom
           - https://www.jitpack.io/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom
         Required by:
             project :app
             project :app > com.facebook.react:react-native:0.64.0
       > Could not find androidx.appcompat:appcompat:1.1.0.
         Searched in the following locations:
           - https://repo.maven.apache.org/maven2/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.pom
           - file:/Users/amirrezabehrouzi/.m2/repository/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.pom
           - file:/Users/amirrezabehrouzi/testChart2/node_modules/react-native/android/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.pom
           - file:/Users/amirrezabehrouzi/testChart2/node_modules/jsc-android/dist/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.pom
           - https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.pom
           - https://www.jitpack.io/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.pom
         Required by:
             project :app > com.facebook.flipper:flipper:0.75.1
       > Could not find androidx.sqlite:sqlite-framework:2.1.0.
         Searched in the following locations:
           - https://repo.maven.apache.org/maven2/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.pom
           - file:/Users/amirrezabehrouzi/.m2/repository/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.pom
           - file:/Users/amirrezabehrouzi/testChart2/node_modules/react-native/android/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.pom
           - file:/Users/amirrezabehrouzi/testChart2/node_modules/jsc-android/dist/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.pom
           - https://dl.google.com/dl/android/maven2/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.pom
           - https://www.jitpack.io/androidx/sqlite/sqlite-framework/2.1.0/sqlite-framework-2.1.0.pom
         Required by:

This is my android/build.gradle code

repositories {
    exclusiveContent {
       filter {
           includeGroup "com.facebook.react"
       }
       forRepository {
           maven {
               url "$rootDir/../node_modules/react-native/android"
           }
       }
   }
    mavenCentral()
    mavenLocal()
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url("$rootDir/../node_modules/react-native/android")
    }
    maven {
        // Android JSC is installed from npm
        url("$rootDir/../node_modules/jsc-android/dist")
    }
  
    google()
    maven { url 'https://www.jitpack.io' }
}

system information : CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz Node: 14.19.3 - ~/.nvm/versions/node/v14.19.3/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 6.14.17 - ~/.nvm/versions/node/v14.19.3/bin/npm Java: 17.0.5 - /usr/bin/javac

amir behrouzi
  • 155
  • 1
  • 10
  • try this one bro https://stackoverflow.com/questions/72346334/execution-failed-for-task-react-native-webviewcompiledebugkotlin/74340238#74340238 – FaysalB Nov 11 '22 at 08:27
  • I 'v added that code to my build.gradle but it is not working @FaysalB – amir behrouzi Nov 11 '22 at 09:20
  • Does this answer your question? [My React Native was working fine upto 4 November but now throwing an exception while Running yarn android](https://stackoverflow.com/questions/74370367/my-react-native-was-working-fine-upto-4-november-but-now-throwing-an-exception-w) – Thanhal P A Nov 11 '22 at 13:27

0 Answers0