The Class 'kotlin. JVM. JvmClassMappingKt' is compiled by a pre - release version of kotlin and always be the loaded by this version of the compiler
Class 'kotlin. Reflect. KClass' is compiled by a pre - release version of kotlin and always be the loaded by this version of the compiler
Should be kotlin version, with the IDEA, the kotlin version 1.4.0 - rc - release - IJ2019.3-2
An error code, the use of retrofit + json to post
Kt master file
.
Val API: API=retrofit. The create (API: : class. Java)
.
Java Api.
Package com. Example. The plugin;
The import of com.example.plugin.net. *;
The import retrofit2. HTTP. Body;
The import retrofit2. HTTP. POST;
The import retrofit2. Call;
Public interface Api {
//send the json data in the form of a post request, the network request the latter part of the interface openapi/API/v written inside the
//Get request data entity class, Take accept data entity class
//send the json data in the form of a post request, the network request the latter part of the interface openapi/API/v written inside the
//Get request data entity class, Take accept data entity class
@ POST (" openapi/API/v2 ")//access Turing
Call}
Ask_text and Return_text are json to kotlin kt generated class file
Also used gradle
Build. Gradle
.
Dependencies {
CompileOnly 'org. Jetbrains. Kotlin: kotlin stdlib - jdk8'
The compile fileTree (dir: '/jars/', includes: [' *. Jar'])
//implementation (" com. Squareup. Okhttp3: okhttp: 4.2.2 ")
Implementation (" com. Squareup. Retrofit2: retrofit: 2.3.0 ")
Implementation 'com. Squareup. Retrofit2: converter - gson: 2.3.0'
Implementation "com. Squareup. Retrofit2: adapter - rxjava: 2.3.0"
}
.
If some version of the implementation and kotlin version does not match...
CodePudding user response:
IsVal API: API=retrofit. The create (API: : class. Java)
This line error
CodePudding user response:
Should be the IDEA version is too low to me updated look at first