【原创】解决React Native报错:Could not find com.github.yalantis:ucrop:2.2.1-native

blogdaren 2018-08-05 抢沙发 3399人次

问题背景

编译 react-native-image-crop-picker 报错:Could not find com.github.yalantis:ucrop:2.2.1-native

问题原因

缺少maven源

解决方案

vim /path/to/project/android/build.gradle,并行配置多个 maven 源:

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"
        }
        maven { 
            url "https://jitpack.io" 
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }  
    }
}

版权声明:除非注明,本文由( blogdaren )原创,转载请保留文章出处。

本文链接:【原创】解决React Native报错:Could not find com.github.yalantis:ucrop:2.2.1-native

发表评论:

您的昵称:
电子邮件:
个人主页: