Problema em código Java na plataforma Android Studio

  • Respostas:0
  • AbertoNão stickySem resposta
  • Posts no fórum: 8

28/01/2020, 14:02:16 via Web

Glide fails to load resources when trying to load an audio file from smartphone

01-16 11:27:34.088 15846-15846/? W/Glide: Load failed for /storage/emulated/0/9fe457b5-7baf-459d-be34-76ec5c2bcf74audio_record.3gp with size [80x80] class com.bumptech.glide.load.engine.GlideException: Failed to load resource
 Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream->Object->Drawable}, LOCAL
   Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->GifDrawable->Drawable}
   Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->Bitmap->Drawable}
   Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->BitmapDrawable->Drawable}
 Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor->Object->Drawable}, LOCAL
   Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->Bitmap->Drawable}
   Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->BitmapDrawable->Drawable}
 Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{AssetFileDescriptor->Object->Drawable}, LOCAL
   Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AssetFileDescriptor->Bitmap->Drawable}

Não entendi essas mensagens que aparecem na Logcat! Não entendo o porquê está ocorrendo isso.
A ideia é pegar o último arquivo de áudio gravado pelo smartphone e transformá-lo em um vetor de bytes. O áudio está sendo gravado corretamente, e salvo na pasta "/storage/emulated/0". O problema acontece quando pegamos esse arquivo de áudio, que nesse caso é o arquivo "/storage/emulated/0/9fe457b5-7baf-459d-be34-76ec5c2bcf74audio_record.3gp", e tentamos carregá-lo.

Seja o primeiro a responder
Recomendado pelo NextPit