简体   繁体   中英

how do i solve it ' error Command failed with exit code 1.' RN

 Task :app:processDevelopmentDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDevelopmentDebugResources'.
> Could not resolve all files for configuration ':app:developmentDebugCompileClasspath'.
   > Could not resolve com.facebook.android:facebook-login:9.+.
     Required by:
         project :app
      > Failed to list versions for com.facebook.android:facebook-login.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/android/facebook-login/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/com/facebook/android/facebook-login/maven-metadata.xml'.
               > org.apache.http.client.ClientProtocolException (no error message)
      > Failed to list versions for com.facebook.android:facebook-login.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/android/facebook-login/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/com/facebook/android/facebook-login/maven-metadata.xml'.
               > org.apache.http.client.ClientProtocolException (no error message)

MY PROJECT / android/app/build.gradle is

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'com.facebook.fbjni:fbjni-java-only:0.0.4'
    implementation 'com.facebook.android:facebook-login:[8,9)'

}

after =>

repositories {
  // You can also use jcenter if you prefer
  mavenCentral() 
}
dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'com.facebook.fbjni:fbjni-java-only:0.0.4'
    implementation 'com.facebook.android:facebook-login:9.+'

and gradlew clean, gradlew build

but I had the same problem.

I need your help.

thank you

I solve it this problem.

2022-05-10,

RN version 0.64.2 => 0.65.2

so, this problem has been solved

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM