2016-08-09 1 views
6

Android Studio를 사용하여 반응하는 기본 Android 브릿지 모듈을 개발하는 데 도움을 드리고자합니다.Android Studio 오류 : 해결 실패 : com.facebook.react : react-native : +?

어떻게이 오류를 해결할 수 있습니까?

Error:Failed to resolve: com.facebook.react:react-native:+ 

FAILURE: Build failed with an exception. 

* What went wrong: 
A problem occurred configuring root project 'android'. 
> Could not resolve all dependencies for configuration ':_debugCompile'. 
    > Could not find any version that matches com.facebook.react:react-native:+. 
    Searched in the following locations: 
     file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/facebook/react/react-native/maven-metadata.xml 
     file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/facebook/react/react-native/ 
     file:/Users/edward3/Library/Android/sdk/extras/android/m2repository/com/facebook/react/react-native/maven-metadata.xml 
     file:/Users/edward3/Library/Android/sdk/extras/android/m2repository/com/facebook/react/react-native/ 
     file:/Users/edward3/Library/Android/sdk/extras/google/m2repository/com/facebook/react/react-native/maven-metadata.xml 
     file:/Users/edward3/Library/Android/sdk/extras/google/m2repository/com/facebook/react/react-native/ 
    Required by: 
     :android:unspecified 

Android Studio를 사용하여/MyBridgeModule/android/폴더를 열었습니다. 버전의 참조 +를 사용하는 경우

내 build.gradle 사전에

buildscript { 
    repositories { 
     mavenCentral() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:1.1.1' 
    } 
} 

apply plugin: 'com.android.library' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.1" 

    defaultConfig { 
     minSdkVersion 16 
     targetSdkVersion 22 
     versionCode 1 
     versionName "1.0" 
     ndk { 
      abiFilters "armeabi-v7a", "x86" 
     } 
    } 
    lintOptions { 
     warning 'InvalidPackage' 
    } 
} 

dependencies { 
    compile "com.facebook.react:react-native:+" 
} 

감사합니다,

답변

2

이 가능 할 수 있습니다. 오프라인으로 전환 할 때 특정 버전을 사용하려고 시도하십시오. +가 Android Studio에서 Offine gradle 빌드와 작동하지 않을 수 있습니다. 또는이 문제를 참조 할 수 있습니다. GitHub Issue referene to same

+1

시간이 많이 걸립니다 ... 감사합니다. –

관련 문제