After Publish app not working
When I test it from Android Studio it works properly. Then I uploaded this app to the Amazon Appstore after customizing but after I downloaded it from their store it did not work and after some time it crashed. This happens again. here the link of this app- https://www.amazon.com/gp/product/B0D1F8K41G
I tested on my device and it worked, only issue was it's too slow while loading (are you using glide properly to load images?).
Can you connect your device to android studio and check logcat and then run the app and share me the error it throws.
Load failed for [content://media/external/audio/albumart/7553942970364219957] with dimensions [150x138] class com.bumptech.glide.load.engine.GlideException: Failed to load resource There were 3 root causes: java.io.FileNotFoundException(No album art found) java.io.FileNotFoundException(No album art found) java.io.FileNotFoundException(No album art found) call GlideException#logRootCauses(String) for more detail Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, LOCAL There was 1 root cause: java.io.FileNotFoundException(No album art found) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed There was 1 root cause: java.io.FileNotFoundException(No album art found) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: No album art found Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.os.ParcelFileDescriptor, LOCAL There was 1 root cause: java.io.FileNotFoundException(No album art found) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed There was 1 root cause: java.io.FileNotFoundException(No album art found) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: No album art found Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.content.res.AssetFileDescriptor, LOCAL There was 1 root cause: java.io.FileNotFoundException(No album art found) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed There was 1 root cause: java.io.FileNotFoundException(No album art found) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class java.io.FileNotFoundException: No album art found
Exception java.lang.RuntimeException: Unable to start activity ComponentInfo{in.webstudio.musicplayer/in.webstudio.musicplayer.PlayerActivity}: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3676) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3813) at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:101) at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2308) at android.os.Handler.dispatchMessage (Handler.java:106) at androidx.test.espresso.base.Interrogator.loopAndInterrogate (Interrogator.java:10) at androidx.test.espresso.base.UiControllerImpl.loopUntil (UiControllerImpl.java:7) at androidx.test.espresso.base.UiControllerImpl.loopUntil (UiControllerImpl.java:1) at androidx.test.espresso.base.UiControllerImpl.injectMotionEvent (UiControllerImpl.java:5) at androidx.test.espresso.action.MotionEvents.sendUp (MotionEvents.java:6) at androidx.test.espresso.action.MotionEvents.sendUp (MotionEvents.java:1) at androidx.test.espresso.action.Tap.sendSingleTap (Tap.java:5) at androidx.test.espresso.action.Tap.-$$Nest$smsendSingleTap at androidx.test.espresso.action.Tap$1.sendTap (Tap.java:1) at androidx.test.espresso.action.GeneralClickAction.perform (GeneralClickAction.java:4) at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform (ViewInteraction.java:2) at androidx.test.espresso.ViewInteraction.doPerform (ViewInteraction.java:23) at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform at androidx.test.espresso.ViewInteraction$1.call (ViewInteraction.java:6) at androidx.test.espresso.ViewInteraction$1.call (ViewInteraction.java:1) at java.util.concurrent.FutureTask.run (FutureTask.java:264) at android.os.Handler.handleCallback (Handler.java:942) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loopOnce (Looper.java:201) at android.os.Looper.loop (Looper.java:288) at android.app.ActivityThread.main (ActivityThread.java:7898) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:936) Caused by java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.get (ArrayList.java:437) at in.webstudio.musicplayer.PlayerActivity.setLayout (PlayerActivity.kt:253) at in.webstudio.musicplayer.PlayerActivity.initServiceAndPlaylist (PlayerActivity.kt:432) at in.webstudio.musicplayer.PlayerActivity.initServiceAndPlaylist$default (PlayerActivity.kt:425) at in.webstudio.musicplayer.PlayerActivity.initializeLayout (PlayerActivity.kt:241) at in.webstudio.musicplayer.PlayerActivity.onCreate (PlayerActivity.kt:122) at android.app.Activity.performCreate (Activity.java:8290) at android.app.Activity.performCreate (Activity.java:8269) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1384) at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate (MonitoringInstrumentation.java:2) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3657)
This might be happening because Glide may not be used optimally to load images efficiently into memory.
It's possible that you're using MediaMetadataRetriever to fetch images and display them directly in an ImageView, which isn't the most efficient approach, especially with a large number of images.