Android Studio错误:无法解决:com.facebook.react:react-native:+?

Ed *_*ain 7 android-studio react-native

我正在尝试使用Android Studio来帮助开发一个反应原生Android桥模块.

我该如何解决这个错误?

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
Run Code Online (Sandbox Code Playgroud)

我使用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:+"
}
Run Code Online (Sandbox Code Playgroud)

提前致谢,

Dip*_* s. 4

+当使用版本参考时,这是可能的。离线时尝试使用特定版本+可能无法与 Android Studio 中的 Offine gradle 构建一起使用,或者这可能参考此问题GitHub Issue 参考相同的内容