RN-Android构建失败:Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'AwesomeProject'.

错误日志:

Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project ‘AwesomeProject‘.

RN-Android构建失败:Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'AwesomeProject'.

原因:本地没有下载对应的gradle版本

解决方法: 新创建一个Android项目,正常运行后,替换RN-Android中的gradle版本

1.在android/gradle/wrapper/目录下查看gradle-wrapper.properties文件,查看里面distributionUrl的值,然后替换就可以了。(我使用的是5.4.1版本)

RN-Android构建失败:Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'AwesomeProject'.

 

 2. 同步之后,可能会出现:Could not resolve all artifacts for configuration ‘:classpath‘. 这个错误

如果出现,找到build.gradle文件,在buildscript.repoitories中添加mavenCentral()即可

RN-Android构建失败:Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'AwesomeProject'.

 

RN-Android构建失败:Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'AwesomeProject'.

上一篇:Happy 2006 POJ - 2773 容斥原理+二分


下一篇:Android Studio git 使用