react-native Could not find com.

作者: 许晓北 | 来源:发表于2017-04-25 19:37 被阅读20次

    在build.gradle (不是 APP bulid.gradle)里面配置 这貌似是官方出现的的问题 据说在0.42.3版本进行了修复

    allprojects {
    repositories {
    mavenLocal()
    jcenter()
    maven {
    // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
    url "$rootDir/../node_modules/react-native/android"
    }
    //修复了 > Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1.错误
    configurations.all {
    resolutionStrategy {
    eachDependency { DependencyResolveDetails details ->
    if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react- native') {
    def file = new File("$rootDir/../node_modules/react-native/package.json")
    def version = new groovy.json.JsonSlurper().parseText(file.text).version
    details.useVersion version
    }
    }
    }
    }
    }
    }

    相关文章

      网友评论

        本文标题:react-native Could not find com.

        本文链接:https://www.haomeiwen.com/subject/nfqurttx.html