在外部库中找不到react-native包

osc*_*cat 5 android gradle react-native

我们有两个名为app和lib的模块.由于我们必须将rn添加到lib中,因此我们添加了lib的build.gradle:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.facebook.react:react-native:+"  // From node_modules}
Run Code Online (Sandbox Code Playgroud)

并在项目的build.gradle中

allprojects {
repositories {
    mavenLocal()
    jcenter()
    maven {
        // All of React Native (JS, Android binaries) is installed from npm
        url "$rootDir/../node_modules/react-native/android"
    }
}}
Run Code Online (Sandbox Code Playgroud)

和node_modules已经下载并放在通常的文件夹中,包含package.json

"dependencies": {
"react": "15.1.0",
"react-native": "0.28.0" }
Run Code Online (Sandbox Code Playgroud)

G:\dev>react-native -v react-native-cli: 1.0.0 react-native: 0.28.0

我们的活动有

<orderEntry type="library" exported="" name="react-native-0.28.0" level="project" />
Run Code Online (Sandbox Code Playgroud)

lib.iml,能及时发现反应原生0.28的依赖一样okhttp-3.2.0,并okio-1.8.0在工作室的外部库(从来没有使用过或前加入),

react-native-0.28.0从未出现在工作室的外部库中,并且对代码无效.

任何想法为什么会发生?提前致谢.

更新

在我compile 'com.android.support:appcompat-v7:23.1.1'输入app模块之后react-native-0.28.0出现了依赖...这很奇怪,这是一个bug还是什么?