android - 更新Android Studio插件MultipleCompilationErrorsException启动失败后,React Native Android获取错误

标签 android react-native gradle build

我正在使用Android Studio开发React Native App。
最近,Android Studio要求我进行一些更新,因此我单击了IDE的某些插件的更新。

现在当我尝试构建时出现错误:

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

我的项目结构:
variables
project Modules

我的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
}

}

构建时如何解决错误:
enter image description here

最佳答案

在执行此操作后已修复:

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/

相关文章:

java - 已授予运行时权限,但仍收到错误 java.io.FileNotFoundException :/storage/emulated/0/. .. .jpg (权限被拒绝)

android - 从 xml(remote) Android 将数据导入到 sqlite

Android:PhoneStateListener 在服务中不工作

java - Pdf 文件无法在 Android 中打开

javascript - 如何安排 React Native 展会的推送通知?

reactjs - 在模型状态中记录 redux 导航状态?

autocomplete - react native : Autocomplete text input with tags

android - 无法在我的项目中合并dex

version-control - 将 hg 修订版写入文件的 Gradle 任务

intellij-idea - Intellij Vertx 调试重启竞争条件