Speld icon indicating copy to clipboard operation
Speld copied to clipboard

Use of Experimental Api annotation causing crash in the project.

Open vivekgupta4Git opened this issue 8 months ago • 5 comments

I am trying to use this library in the project but got the crash

Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/ui/platform/LocalSoftwareKeyboardController; at com.yogeshpaliyal.speld.OtpViewKt.PinInput(OtpView.kt:81) at com.health.zyephr.featureModules.abha.views.enrollment.screen.validateotpforaadhaar.components.ValidateOtpForAadhaarKt.ValidateOtpForAadhaar(ValidateOtpForAadhaar.kt:18) at com.health.zyephr.featureModules.abha.views.enrollment.screen.validateotpforaadhaar.components.ValidateOtpForAadhaarKt.PreviewValidateOtpForAadhaar(ValidateOtpForAadhaar.kt:30) ... 68 more Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.compose.ui.platform.LocalSoftwareKeyboardController" on path: DexPathList[[zip file "/data/app/~~gRDIJZykEHNQWEhHDt4kPw==/com.health.zyephr-4pffddMASXmr0ocAR2ckyA==/base.apk"],nativeLibraryDirectories=[/data/app/~~gRDIJZykEHNQWEhHDt4kPw==/com.health.zyephr-4pffddMASXmr0ocAR2ckyA==/lib/arm64, /data/app/~~gRDIJZykEHNQWEhHDt4kPw==/com.health.zyephr-4pffddMASXmr0ocAR2ckyA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) at java.lang.ClassLoader.loadClass(ClassLoader.java:637) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) ... 71 more

I am using compose bom version 2024:08:00. I did a little bit research and found this discussion on ExperimentalApi annotation and seems like this is the case only in this library .

vivekgupta4Git avatar Apr 09 '25 14:04 vivekgupta4Git

Thanks for reporting this, will fix this and release a new version ASAP.

yogeshpaliyal avatar Apr 09 '25 17:04 yogeshpaliyal

@vivekgupta4Git If you have some ideas or proposal to fix this feel free to raise a PR.

yogeshpaliyal avatar Apr 10 '25 17:04 yogeshpaliyal

This is fixed can you please check in v1.0.3

yogeshpaliyal avatar Apr 12 '25 18:04 yogeshpaliyal

@yogeshpaliyal I have tried using v3 in the project as I am still using kotlin 1.9.0 version, I am unable to add your library as a dependency. If i include you library, i have update my kotlin as well core-ktx library and jetpack compose ..lots of things. so couldn't try it !

vivekgupta4Git avatar Apr 13 '25 14:04 vivekgupta4Git

Okay, cool, let me know if it works in future when you bump the kotlin and core-ktx versions

yogeshpaliyal avatar Apr 13 '25 14:04 yogeshpaliyal