我正在使用Android Studio开发React Native App。
最近,Android Studio要求我进行一些更新,因此我单击了IDE的某些插件的更新。
现在当我尝试构建时出现错误:
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
我的项目结构:
我的build.grale内容:
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
}
repositories {
google()
jcenter()
}
dependencies {
classpath('com.android.tools.build:gradle:3.6.1')
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
构建时如何解决错误:
最佳答案
在执行此操作后已修复:
rm -rf node_modules
yarn // install react native project dependencies
yarn cache clean
删除.idea项目Android Studio
在Android Studio中重新打开该项目,然后重新构建
关于android - 更新Android Studio插件MultipleCompilationErrorsException启动失败后,React Native Android获取错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60937934/