Hi Folks, I am encountering the following dexing ...
# android
h
Hi Folks, I am encountering the following dexing error while attempting to build an Android app. The Android App depends on an SDK which is written in KMP. This error popped up after I upgraded
kotlin("multiplatform") version "1.9.23"
to
kotlin("multiplatform") version "2.0.0"
in the SDK.
Copy code
BUILD FAILED in 43s

error Failed to install the app. Make sure you have the Android development environment set up: <https://reactnative.dev/docs/environment-setup>.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
ERROR:/Users/hemendra/.gradle/caches/transforms-3/85a6d5b00d3905038a542311c246e6d3/transformed/jetified-slf4j-api-2.0.16.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform slf4j-api-2.0.16.jar (org.slf4j:slf4j-api:2.0.16) to match attributes {artifactType=android-dex, asm-transformed-variant=debug, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=26, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/hemendra/.gradle/caches/transforms-3/85a6d5b00d3905038a542311c246e6d3/transformed/jetified-slf4j-api-2.0.16.jar.
         > Error while dexing.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
Any suggestions on how to resolve this? Thanks in advance. Hemendra
not kotlin but kotlin colored 2
c
Seems like your react native project is not compatible with Kotlin 2.0.