ReactNative报错Could not download

2021-03-21  本文已影响0人  Poppy11

运行以前的项目,发现一直启动不起来,首先排除环境配置问题,然后就是第一次启动输入命令时一直报错

yarn react-native run-android

各种Could not download 或者could not resource,一般遇到这种问题,以下两步解决办法

allprojects {
    repositories {
          mavenLocal()
        google()
        jcenter()
         maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
        maven {
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        
        maven { url 'https://jitpack.io' }

    }
}
buildscript {
    
    repositories {
       jcenter()
        google()
       maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } 
    }
    
}
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=file\:///C:/Users/Administrator/.gradle/wrapper/dists/gradle-5.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
上一篇 下一篇

猜你喜欢

热点阅读