Android 5.1 java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration;
popup java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration; when I use upload FTP
Please provide also the information requested in the issue template, at least the library version used
version 4.9.2, I change to 4.8.0 its solve , compileSdk 34 but For Android 14 version 4.8.0 pop another Error
Error: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration;
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration;
at org.apache.commons.net.ftp.FTPClient.
And For Android 14 version 4.8.0 will pop Error: FATAL EXCEPTION: main Process: com.itunicode.sqlmpos.debug, PID: 14476 java.lang.SecurityException: com.itunicode.sqlmpos.debug: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:6192) at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1863) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1803) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1791) at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:766) at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:766) at net.gotev.uploadservice.observer.request.BaseRequestObserver.register(BaseRequestObserver.kt:36) at net.gotev.uploadservice.observer.request.RequestObserver.register(RequestObserver.kt:30) at net.gotev.uploadservice.observer.request.RequestObserver_LifecycleAdapter.callMethods(RequestObserver_LifecycleAdapter.java:25) at androidx.lifecycle.SingleGeneratedAdapterObserver.onStateChanged(SingleGeneratedAdapterObserver.kt:22)
Any details you need more ?
java.time.Duration this library maybe cannot use in andoird 5 and below
Do you have errors on Android 14 with the latest 4.9.2?
no errors , Android 14 with the latest 4.9.2 is fine, but low version cannot
I think just change the java.time.Duration this class usage, will fix .
any updates , need help for develop?
inside you use https://commons.apache.org/proper/commons-net/javadocs/api-1.4.1/org/apache/commons/net/ftp/FTPClient.html this right? I test it in android low version also popup error
That part is a dependency of the FTP module and it's not used in the core library. From what I read, with 4.9.2 you're not experiencing any errors on Android 14. The problems you are reporting do happen only on Android 13 or also lower versions?
I didnt tried Android 13, but no error on Android 14
No evidence of library errors so far, so closing this one