adrielcafe / AndroidAudioConverter

Convert audio files inside your Android app easily. Supported formats: AAC, MP3, M4A, WMA, WAV and FLAC.
1.33k stars 254 forks source link

Error. error=13, Permission denied in Android Q(10) #38

Open jhui20130703 opened 4 years ago

jhui20130703 commented 4 years ago

The targetSdkVersion<=28 used in the development project before, the audio conversion is normal. Later, I changed targetSdkVersion=29, and running the project found that AMR conversion to MP3 failed. The exception message: java.io.IOException: Cannot run program "/data/user/0/package name/files/ffmpeg": error=13, Permission denied, Please help me with the author and developers. thank you all.

Wisdozzh commented 3 years ago

From Android Q onwards, you cannot execute binaries in your app's private data directory. From the issuetracker: https://issuetracker.google.com/issues/128554619

Change only on Build.gradle file targetSdkVersion 29 to 28 and Re-Install your app on your device - It is resolved your permission issue for temporary because of the targetSdkVersion 29 is required platform for released build on play store so I suggest to you use this library

T7Droid commented 3 years ago

Try adding this line to your Manifest file, inside the application tag:

android:requestLegacyExternalStorage=true

This should solve the Write/Reading permissions problem.

I'm using the targetSdkVersion=30

paragwadhwani commented 3 years ago

From Android Q onwards, you cannot execute binaries in your app's private data directory. From the issuetracker: https://issuetracker.google.com/issues/128554619

Change only on Build.gradle file targetSdkVersion 29 to 28 and Re-Install your app on your device - It is resolved your permission issue for temporary because of the targetSdkVersion 29 is required platform for released build on play store so I suggest to you use this library

I tried this but its a temporary solution Please suggest a permanent solution for this

yyms3275 commented 3 years ago

The targetSdkVersion<=28 used in the development project before, the audio conversion is normal. Later, I changed targetSdkVersion=29, and running the project found that AMR conversion to MP3 failed. The exception message: java.io.IOException: Cannot run program "/data/user/0/package name/files/ffmpeg": error=13, Permission denied, Please help me with the author and developers. thank you all.

I solved the same problem as below. I solved the problem by using a different library.

https://github.com/tanersener/mobile-ffmpeg

1656150492 commented 3 years ago

Try adding this line to your Manifest file, inside the application tag:

android:requestLegacyExternalStorage=true

This should solve the Write/Reading permissions problem.

I'm using the targetSdkVersion=30

I wrote it like this, but it's useless