You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Able to compile code and generate .apk file and Below is the error we are getting during runtime.
07-02 13:57:49.245 19976 20076 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-5
07-02 13:57:49.245 19976 20076 E AndroidRuntime: Process: com.xyz.xyz.qa, PID: 19976
07-02 13:57:49.245 19976 20076 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/json/Json;
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at .......
.....
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.lang.Thread.run(Thread.java:1012)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlinx.serialization.json.Json" on path: DexPathList[[zip file "/data/app/~~N6alC4MfPGo0PSOzCyFhTQ==/com.xyz.xyz.qa-kpgx5B81J2Pl9J1wikvpjg==/base.apk"],nativeLibraryDirectories=[/data/app/~~N6alC4MfPGo0PSOzCyFhTQ==/com.xyz.xyz.qa-kpgx5B81J2Pl9J1wikvpjg==/lib/arm64, /data/app/~~N6alC4MfPGo0PSOzCyFhTQ==/com.xyz.xyz.qa-kpgx5B81J2Pl9J1wikvpjg==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: ... 11 more
Tried adding below entries in build.gradle.
**plugins {
id 'org.jetbrains.kotlin.jvm' version '2.0.0'
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.0'
}
repositories {
mavenCentral()
}
And one more thing what i observed is kotlinx-serialization-json is not getting downloaded to local .gradle folder.
Also, in the generated .apk file I see kotlinx-serialization-json reference but still not able to find during runtime. FYI, please find screen attached.
Environment
Kotlin version: [2.0.0]
Cordova 6.5.0
Gradle version: [6.8.3]
CompileSdkVersion=33
TargetSdkVersion= 33
Any inputs appreciated.
The text was updated successfully, but these errors were encountered:
I'm not familiar with Cordova, so maybe it requires some additional setup. I can recommend you check if the issue is the same across different variants (debug and release). Maybe your minifying rules are too strict? Also, check in tests: if regular (non-device) tests do not have this problem, this also indicates problem with application packaging.
Able to compile code and generate .apk file and Below is the error we are getting during runtime.
07-02 13:57:49.245 19976 20076 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-5
07-02 13:57:49.245 19976 20076 E AndroidRuntime: Process: com.xyz.xyz.qa, PID: 19976
07-02 13:57:49.245 19976 20076 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/serialization/json/Json;
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at .......
.....
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.lang.Thread.run(Thread.java:1012)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlinx.serialization.json.Json" on path: DexPathList[[zip file "/data/app/~~N6alC4MfPGo0PSOzCyFhTQ==/com.xyz.xyz.qa-kpgx5B81J2Pl9J1wikvpjg==/base.apk"],nativeLibraryDirectories=[/data/app/~~N6alC4MfPGo0PSOzCyFhTQ==/com.xyz.xyz.qa-kpgx5B81J2Pl9J1wikvpjg==/lib/arm64, /data/app/~~N6alC4MfPGo0PSOzCyFhTQ==/com.xyz.xyz.qa-kpgx5B81J2Pl9J1wikvpjg==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
07-02 13:57:49.245 19976 20076 E AndroidRuntime: ... 11 more
**plugins {
id 'org.jetbrains.kotlin.jvm' version '2.0.0'
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.0'
}
repositories {
mavenCentral()
}
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1"**
And one more thing what i observed is kotlinx-serialization-json is not getting downloaded to local .gradle folder.
Also, in the generated .apk file I see kotlinx-serialization-json reference but still not able to find during runtime. FYI, please find screen attached.
![image](https://private-user-images.githubusercontent.com/168512819/345099304-c2d27016-ad2b-4a9e-b7f5-1c06b65e8248.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMzE5MTcsIm5iZiI6MTcyNjEzMTYxNywicGF0aCI6Ii8xNjg1MTI4MTkvMzQ1MDk5MzA0LWMyZDI3MDE2LWFkMmItNGE5ZS1iN2Y1LTFjMDZiNjVlODI0OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMlQwOTAwMTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01NTIwNTBhNTYwOGFkMjJhOTE0NGZjYjY5ZTRlMzIzMGVjOGQ0OWVhMDI0NTA5Y2VhYzEwN2VhZjI4YjFmM2VkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.UEKMzRBSX_oa1i5frKK5gQ2LBxzbDw_cKjXHY3eYkDU)
Environment
Any inputs appreciated.
The text was updated successfully, but these errors were encountered: