Closed nohli closed 10 months ago
@nohli i don't have real device, i just tested with emulator Pixel 6 and 7 and i don't have any issue
@kalismeras61, this issue doesn't occur on a local Pixel 6 emulator on my side either. I've updated the steps to reproduce the problem.
@nohli can you try fix startup crash issue branch ?
https://github.com/florent37/Flutter-AssetsAudioPlayer/tree/fix-startup-crash-issue
Unfortunately still the same exception
E/AndroidRuntime(14742): FATAL EXCEPTION: main
E/AndroidRuntime(14742): Process: com.example.audioplayer_test, PID: 14742
E/AndroidRuntime(14742): java.lang.RuntimeException: Unable to create service com.github.florent37.assetsaudioplayer.notification.NotificationService: java.lang.ClassNotFoundException: Didn't find class "com.github.florent37.assetsaudioplayer.notification.NotificationService" on path: DexPathList[[zip file "/data/app/~~XMy4v6ZU4DnhnvM_PxBQyA==/com.example.audioplayer_test-s6vgELe2m4pyAP_BVEmEFw==/base.apk"],nativeLibraryDirectories=[/data/app/~~XMy4v6ZU4DnhnvM_PxBQyA==/com.example.audioplayer_test-s6vgELe2m4pyAP_BVEmEFw==/lib/arm64, /data/app/~~XMy4v6ZU4DnhnvM_PxBQyA==/com.example.audioplayer_test-s6vgELe2m4pyAP_BVEmEFw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
E/AndroidRuntime(14742): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4498)
E/AndroidRuntime(14742): at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
E/AndroidRuntime(14742): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2161)
E/AndroidRuntime(14742): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(14742): at android.os.Looper.loopOnce(Looper.java:201)
E/AndroidRuntime(14742): at android.os.Looper.loop(Looper.java:288)
E/AndroidRuntime(14742): at android.app.ActivityThread.main(ActivityThread.java:7872)
E/AndroidRuntime(14742): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14742): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/AndroidRuntime(14742): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
E/AndroidRuntime(14742): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.github.florent37.assetsaudioplayer.notification.NotificationService" on path: DexPathList[[zip file "/data/app/~~XMy4v6ZU4DnhnvM_PxBQyA==/com.example.audioplayer_test-s6vgELe2m4pyAP_BVEmEFw==/base.apk"],nativeLibraryDirectories=[/data/app/~~XMy4v6ZU4DnhnvM_PxBQyA==/com.example.audioplayer_test-s6vgELe2m4pyAP_BVEmEFw==/lib/arm64, /data/app/~~XMy4v6ZU4DnhnvM_PxBQyA==/com.example.audioplayer_test-s6vgELe2m4pyAP_BVEmEFw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
E/AndroidRuntime(14742): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
E/AndroidRuntime(14742): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(14742): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(14742): at android.app.AppComponentFactory.instantiateService(AppComponentFactory.java:129)
E/AndroidRuntime(14742): at androidx.core.app.CoreComponentFactory.instantiateService(CoreComponentFactory.java:75)
E/AndroidRuntime(14742): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4467)
E/AndroidRuntime(14742): ... 9 more
@nohli can you put here your whole build.gradle file ?
As mentioned in the steps to reproduce, the vanilla gradle file from flutter create already has this issue.
The only necessary change was adding multidex true to android/app/build.gradle for the project to build.
As mentioned in the steps to reproduce, the vanilla gradle file from flutter create already has this issue.
The only necessary change was adding multidex true to android/app/build.gradle for the project to build.
Yes i know, as i said, i can't reproduce it, if you are using minified in your build gradle maybe it is removing some classes. That's why i asked.
Also not with Pixel 7 API 33 with Google Play?
I'm using Flutter 3.10.6 and an Apple Silicon Mac. The crashes were in production built with Codemagic, so not only a local issue.
@kalismeras61 I just tried it, and the app worked without issues. Then created another fresh app, and it also worked. Then wiped the data of the emulator, then it started failing again. So please make sure to wipe the data first.
@blueeyestw let's track the issue over here 😊
Have a couple of questions, just to make sure:
^3.0.6
in pubspec.yaml means >=3.0.6 <4.0.0
and would use 3.1.0
)?@nohli @florent37 @kalismeras61
Hi is there any solution for this I am facing the same issue please refer to the below crash logs
Fatal Exception: java.lang.RuntimeException: Unable to create service com.github.florent37.assetsaudioplayer.notification.NotificationService: java.lang.ClassNotFoundException: Didn't find class "com.github.florent37.assetsaudioplayer.notification.NotificationService" on path: DexPathList[[zip file "/data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/base.apk", zip file "/data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/split_config.arm64_v8a.apk", zip file "/data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/split_config.en.apk", zip file "/data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/lib/arm64, /data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/base.apk!/lib/arm64-v8a, /data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/split_config.arm64_v8a.apk!/lib/arm64-v8a, /data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/split_config.en.apk!/lib/arm64-v8a, /data/app/~~H0pvMZl2fKTADMS8ObAP-Q==/com.vidola.gapp.customer-pBT37hxAUvTwp_A35tr5PQ==/split_config.xxhdpi.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64, /vendor/lib64, /odm/lib64, /my_product/lib64, /my_region/lib64]] at android.app.ActivityThread.handleCreateService(ActivityThread.java:4572) at android.app.ActivityThread.access$100(ActivityThread.java:299) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2207) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:264) at android.app.ActivityThread.main(ActivityThread.java:8312) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
Flutter Version
My version : 3.10.6
Lib Version
My version : 3.1.0 (all >3.0.6)
Platform (Android / iOS / web) + version
Platform : Android
Describe the bug
A lot of crashes on app start in production.
Another report: https://github.com/florent37/Flutter-AssetsAudioPlayer/pull/788#issuecomment-1691224515
Google Pixel 7 emulator with latest plugin version:
Steps to reproduce
assets_audio_player: ^3.1.0
topubspec.yaml
orandroid/app/build/gradle
:Pixel 7 API 33
(create a new one, or wipe the data of your existing one)