1

반응 네이티브 버전 0.51.0반응 - 네이티브 fbsdk은 'com.android.support:appcompat-v7:25.0.0'

반응 - 네이티브 fbsdk 버전 0.6.3을 컴파일되지 나는 버전을 사용해 않았다 0.6.0

프로젝트 실행 전에이 반응 - 기본 - fbsdk/build.gradle

apply plugin: 'com.android.library' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.3" 

    defaultConfig { 
     minSdkVersion 16 
     targetSdkVersion 25 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile 'com.android.support:appcompat:25.0.0' 
    compile 'com.android.support:design:25.0.0' 
    compile 'com.facebook.react:react-native:+' // support react-native-v0.22-rc+ 
    compile('com.facebook.android:facebook-android-sdk:4.+') 
} 

이 난 것입니다 내가 https://developers.facebook.com/docs/react-native/configure-android-current

의 모든 단계를 수행 반응 - 네이티브 fbsdk 설치 의 응용 프로그램/build.gradle

dependencies { 
    compile project(':react-native-fbsdk') 
    compile fileTree(dir: "libs", include: ["*.jar"]) 
    compile "com.android.support:appcompat-v7:23.0.1" 
    compile "com.facebook.react:react-native:+" // From node_modules 
} 

및 오류입니다 ... 나는 그것을 해결하는 올바른 방법을 찾는 게 아니에요 동안이 해결 방법을하고 있어요

Error:Error:Failed to resolve: com.android.support:appcompat-v7:27.0.1 
Error:Error:Failed to resolve: com.android.support:appcompat:25.0.0 
Error:Error:Failed to resolve: com.android.support:customtabs:27.0.1 
Error:Error:Failed to resolve: com.android.support:cardview-v7:27.0.1 
Error:Error:Failed to resolve: com.android.support:support-v4:27.0.1 
Error:Error:Failed to resolve: com.android.support:support-core-utils:27.0.1 
Error:Error:Failed to resolve: com.android.support:support-annotations:27.0.1 
Error:Error:Failed to resolve: com.android.support:appcompat-v7:27.0.1 
Error:Error:line (19)Failed to resolve: com.android.support:appcompat:25.0.0 
Error:Error:Failed to resolve: com.android.support:customtabs:27.0.1 
Error:Error:Failed to resolve: com.android.support:cardview-v7:27.0.1 
Error:Error:Failed to resolve: com.android.support:support-v4:27.0.1 
Error:Error:Failed to resolve: com.android.support:support-core-utils:27.0.1 
+0

시도에 build.gradle에 com.android.support:appcompat 변경 제한하는 데 도움이 될 것입니다 resolutionStrategy 추가 maven.google.com
2의 allprojects 섹션에 새 maven 줄을 추가입니다 안드로이드 SDK 매니저에서'지원 저장소'를 갱신하십시오. https://developer.android.com/studio/intro/update.html – punksta

+0

최신 버전이 이미 설치되어 있습니다. –

답변

0

.

node_modules/react-native-fbsdk/android/build.gradle이 변경하십시오 :

//Before 
dependencies { 
    ... 
    compile('com.facebook.android:facebook-android-sdk:4+') 
} 

//After 
dependencies { 
    ... 
    compile('com.facebook.android:facebook-android-sdk:4.28.0') 
} 

어쩌면 당신도 도움이됩니다.

0

반응 네이티브 프로젝트 : android/build.gradle으로 이동하십시오.
1. 당신이해야 할 모든 android:facebook-android-sdk:4.28.0

allprojects { 
    repositories { 
     mavenLocal() 
     jcenter() 
     configurations.all { 
      resolutionStrategy { 
       force 'com.facebook.android:facebook-android-sdk:4.28.0' 
      } 
     } 
     maven { 
      url "https://maven.google.com" 
     } 
     maven { 
      // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 
      url "$rootDir/../node_modules/react-native/android" 
     } 

    } 
} 
0

dependencies { 
    compile project(':react-native-fbsdk') 
    compile fileTree(dir: "libs", include: ["*.jar"]) 
    compile "com.android.support:appcompat-v7:27.0.1" 
    compile "com.facebook.react:react-native:+" // From node_modules 
}