React Native:The development server returned response error code: 404 || version mismatch

The development server returned response error code: 404



::ffff:127.0.0.1 - - [15/May/2018:09:49:13 +0000] "GET /index.android.delta?platform=android&dev=true&minify=false HTTP/1.1" 404 79 "-" "okhttp/3.6.0"

或者


解决方法:

打开android/app/build.gradle

compile 'com.facebook.react:react-native:+'
修改为:
compile ("com.facebook.react:react-native:0.47.1") { force = true }
0.47.1替换你自己的react-native版本号

新版本的gradle 不锁定react-natvie版本导致的


原因:

Once each repository has been inspected for the module, Gradle will choose the 'best' one to use. This is done using the following criteria:

For a dynamic version, a 'higher' concrete version is preferred over a 'lower' version.

Modules declared by a module metadata file (.module, .pom or ivy.xml file) are preferred over modules that have an artifact file only.

Modules from earlier repositories are preferred over modules in later repositories.

When the dependency is declared by a concrete version and a module metadata file is found in a repository, there is no need to continue searching later repositories and the remainder of the process is short-circuited.

Source: https://docs.gradle.org/current/userguide/introduction_dependency_management.html#sec:dependency_resolution

参考:https://github.com/facebook/react-native/issues/19259


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值