HI ! And we are here with a beautiful gradle warni...
# android
g
HI ! And we are here with a beautiful gradle warning:
Copy code
Runtime JAR files in the classpath should have the same version. These
files were found in the classpath:
and
Copy code
w: Consider providing an explicit dependency on kotlin-reflect 1.5 to
prevent strange errorsw: Some runtime JAR files in the classpath have
an incompatible version. Consider removing them from the classpath
By inspecting the dependendencies: one library use 1.3 , one 1.4 and so on , and for last but not least I have just update my project to 1.5 version .. Sure I can bring back the version to 1.4, but there are other library set to 1.3. In which way kotlin-reflect could resolves the issue ? I provided an esplicit dependency on kotlin-reflect, but the warning still there.. Also some google's libraries However is not already updated to 1.5.0, for instance:
Copy code
--- com.android.tools.analytics-library:tracker:27.2.0
 
 | | +--- com.android.tools:annotations:27.2.0
 
 | | +--- com.android.tools:common:27.2.0 (*)
 
 | | +--- com.android.tools.analytics-library:protos:27.2.0 (*)
 
 | | +--- com.android.tools.analytics-library:shared:27.2.0 (*)
 
 | | +--- com.google.protobuf:protobuf-java:3.10.0
 
| | +--- com.google.guava:guava:28.1-jre (*)
 
 | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.31 (*)
What could happen if I would use different libraries with different kotlin version ? Do you update your project's kotlin language's version only when all the imported libraries are updated ? For instance this is the dependendencies of the old lifecycle-livedata-ktx:2.2.0, in an official libraries there are two different version of kotlin-stlib 1.3.5 and 1.4:
| | | | \--- androidx.lifecyclelifecycle livedata ktx2.2.0
| | | | +--- org.jetbrains.kotlinkotlin stdlib1.3.50 -> 1.5.0 (*)
| | | | +--- org.jetbrains.kotlinxkotlinx coroutines core1.3.0 -> 1.4.1
| | | | | \--- org.jetbrains.kotlinxkotlinx coroutines core jvm1.4.1
| | | | | +--- org.jetbrains.kotlinkotlin stdlib1.4.0 -> 1.5.0 (*)
| | | | | \--- org.jetbrains.kotlinkotlin stdlib common1.4.0 -> 1.5.0
| | | | +--- androidx.lifecyclelifecycle livedata2.2.0 (*)
| | | | \--- androidx.lifecyclelifecycle livedata core ktx2.2.0
| | | | +--- org.jetbrains.kotlinkotlin stdlib1.3.50 -> 1.5.0 (*)
| | | | \--- androidx.lifecyclelifecycle livedata core2.2.0 (*)
Please forgive all these questions
đŸ§µ 4
đŸ§µ 2
đŸ˜­
No One ? It's too many question or are too stupid questions ? đŸ˜¥
see if you can adapt this sample to your need
place this in your rootproject build.gradle
you can enfore a specific version, reflect in your case
or just add kotlin reflect to dependencies