【发布时间】:2022-07-01 21:19:46
【问题描述】:
无法加载类“ijinit_dkec9zswd4p83aajh1klyj0h5”。 (React_native gradle 同步问题)
我在构建 .apk 时遇到 Gradle 同步问题,dubug apk 工作正常。
我还清理了 Gradle 并重建了我的应用程序,但仍然没有任何改进。
构建脚本:
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
ndkVersion = "21.4.7075529"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
错误:
Unable to load class 'ijinit_dkec9zswd4p83aajh1klyj0h5'.
This is an unexpected error. Please file a bug containing the idea.log file.
FAILURE:构建失败并出现异常。
- 出了什么问题: 无法从缓存加载初始化脚本“C:\Users\User\AppData\Local\Temp\ijinit.gradle”的编译类。
ijinit_dkec9zswd4p83aajh1klyj0h5
-
尝试: 使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
-
例外情况是: org.gradle.api.GradleException: 无法从缓存加载初始化脚本“C:\Users\User\AppData\Local\Temp\ijinit.gradle”的编译类。
原因:java.lang.ClassNotFoundException:ijinit_dkec9zswd4p83aajh1klyj0h5
【问题讨论】: