[英]I get this error when refreshing gradle project: Cause: invalid type code: B3
After I hit " Refresh all gradle projects " 在我点击“ 刷新所有gradle项目 ”之后
I get the error: 我得到错误:
Cause: invalid type code: B3 原因:类型代码无效:B3
I am trying to refresh it because I added this dependencies: 我尝试刷新它,因为我添加了以下依赖项:
implementation 'com.squareup.okhttp3:okhttp:3.0.1'
compile 'com.squareup.okhttp3:okhttp:3.0.1'
and now want to import OkHttpClient in the class but it isn't working 现在想在类中导入OkHttpClient,但是它不起作用
Java is 12.0.1 Gradle is 5.5 Java是12.0.1 Gradle是5.5
Gradle code: 摇篮代码:
settings.gradle file: settings.gradle文件:
pluginManagement {
repositories {
mavenCentral()
maven {
url "http://dl.bintray.com/mbuhot/maven"
}
}
dependencies {
compile 'mbuhot:eskotlin:0.7.0'
compile group: 'com.mashape.unirest', name: 'unirest-java', version: '1.3.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.4'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
}
}
rootProject.name = 'ndmWebApp'
build.gradle file: build.gradle文件:
plugins {
id 'org.springframework.boot' version '2.1.3.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
id 'org.jetbrains.kotlin.plugin.spring' version '1.3.21'
}
apply plugin: 'io.spring.dependency-management'
group = 'ProjectoFinal.ndmWebApp'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
//elasticSearch
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
implementation 'com.squareup.okhttp3:okhttp:3.0.1'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
}
This seems to be an open bug with Java 11+, Gradle 5 and IntelliJ. 这似乎是Java 11 +,Gradle 5和IntelliJ的一个公开错误 。 As far as I have seen it you have two options: 据我所知,您有两种选择:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.