- ReactNative报错Could not download
- AS flutter报错 Could not download
- Could not download wechat-sdk-an
- ios transporter交付ipa报错 could not
- 上传ipa报错could not download
- ERROR: Could not connect to lock
- Could not download wechat-sdk-an
- Flutter调试报错Could not download解决不
- AS Could not download javaparser
- Execution failed for task ':app:
运行以前的项目,发现一直启动不起来,首先排除环境配置问题,然后就是第一次启动输入命令时一直报错
yarn react-native run-android
各种Could not download 或者could not resource,一般遇到这种问题,以下两步解决办法
- 1、首先排除网络问题,若wifi不行,连接自己手机热点,下载那些包
- 2、配置build.gradle,这个文件在android目录下和android/app目录下,有两个都要配置,这里面配置的其实也就是下载这些依赖的代理什么的,我把所有代理都加上了
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/' }
}
}
- 3、如遇到gradle包下载太慢或者下载失败,可自己手动下载,文件夹在android/gradle/wrapper,找到这个文件gradle-wrapper.properties,把下载后的gradle放在这个里面的路径下distributionUrl
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
网友评论