3

I have developed an app that works up to Android 9 and with Android 10 it doesn't. The app should wait for a new file to be created in a specific folder and then perform some actions, my main suspect is FileObserver because with the API 29 it tells me that the constructor FIleObserver (String path) is deprecated. Using the suggested FileObserver (File file), introduced with the API 29, when I launch the application I get this error:

java.lang.NoSuchMethodError: No direct method (Ljava / io / File; I) V in class Landroid / os / FileObserver; or its super classes (declaration of 'android.os.FileObserver' appears in /system/framework/framework.jar!classes2.dex)

would anyone know how to help me?

Francesco
  • 43
  • 7

0 Answers0