gafsel / flutter_plugin_playlist

A Flutter plugin for Android and iOS with native support for audio playlists, background support, and lock screen controls
MIT License
23 stars 8 forks source link

Causing Fatal RunTim error. ClassNotFoundException: Didn't find class #36

Closed fathah closed 3 years ago

fathah commented 3 years ago

When I try to run the app, it crashes. Debug Report follows

D/AndroidRuntime(23393): Shutting down VM
E/AndroidRuntime(23393): FATAL EXCEPTION: main
E/AndroidRuntime(23393): Process: com.myMusic.app, PID: 23393
E/AndroidRuntime(23393): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/exoplayer2/drm/DefaultDrmSessionManager$EventListener;
E/AndroidRuntime(23393):    at com.devbrackets.android.exomedia.core.audio.ExoAudioPlayer.<init>(ExoAudioPlayer.java:62)
E/AndroidRuntime(23393):    at com.devbrackets.android.exomedia.AudioPlayer.<init>(AudioPlayer.java:64)
E/AndroidRuntime(23393):    at com.devbrackets.android.exomedia.AudioPlayer.<init>(AudioPlayer.java:60)
E/AndroidRuntime(23393):    at org.gafs.flutter_plugin_playlist.playlist.AudioApi.<init>(AudioApi.java:25)
E/AndroidRuntime(23393):    at org.gafs.flutter_plugin_playlist.service.MediaService.onCreate(MediaService.java:23)
E/AndroidRuntime(23393):    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3953)
E/AndroidRuntime(23393):    at android.app.ActivityThread.access$1500(ActivityThread.java:219)
E/AndroidRuntime(23393):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1875)
E/AndroidRuntime(23393):    at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(23393):    at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(23393):    at android.app.ActivityThread.main(ActivityThread.java:7356)
E/AndroidRuntime(23393):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(23393):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/AndroidRuntime(23393):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

E/AndroidRuntime(23393): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.exoplayer2.drm.DefaultDrmSessionManager$EventListener" on path: DexPathList[[zip file "/data/app/com.myMusic.app-0C3d5JWbkwp6h-p8uro5BQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.myMusic.app-0C3d5JWbkwp6h-p8uro5BQ==/lib/x86, /data/app/com.myMusic.app-0C3d5JWbkwp6h-p8uro5BQ==/base.apk!/lib/x86, /system/lib, /system/product/lib]]

E/AndroidRuntime(23393):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
E/AndroidRuntime(23393):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(23393):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
gafsel commented 3 years ago

Hello @fathah seams to be a dependency conflict. Do you use another plugin in your app that uses the exomedia? (for example, some kind of video payer or another audio player).

fathah commented 3 years ago

@gafsel Thanks for your response. Yeah, I just realized that I was using another one. Solved! 🤗