Why minSdk is 23 ?
AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [:flutter_sound] flutter_sound\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 23,
or use tools:overrideLibrary="com.dooboolab.fluttersound" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
I'm having the same issue here. And even if I try changing my minSdk to 23 the app crashes calling startPlayer().
D/MediaPlayerNative(14156): Message: MEDIA_ERROR(100), ext1=MEDIA_ERROR_UNKNOWN(1), ext2=0x80000000
E/MediaPlayerNative(14156): error (1, -2147483648)
E/FlutterSoundPlugin(14156): startPlayer() exception
I'm using flutter_sound ^1.4.8 on Flutter v1.9.1+hotfix.5.
I solved this by changing version to 1.6.0
I got the same problem. Changing to 1.6.0 did not solve.
Remove the ^ character from your import like this => flutter_sound: 1.6.0
@Larpoux Could you support this issue? The last commit, you've updated to 23 and I also want to know any downside if we revert this version
Could someone else try to downgrade this to 16 and test out if it works correctly without updating to 23?
Yes @Hyochan. I will look to this issue tomorrow.
I do not think this is very serious problem.
Hi everybody,
Just to inform you:
I have no real Android device so old, so I must do all the tests with the Android Simulator:
flutter_sound seems to work fine with SDK 24, 23 and 22. Both with Flutter channel Master and Flutter channel Stable
flutter_sound has problem with SDK 16 and 17 because of the Skia engine. Skia hardware emulation fails, and software emulation is unusable because too long for emulation. This could be a problem with the Android emulator and not with flutter_sound.
flutter_sound was successful on SDK 19 channel stable, but give an error message on channel master : (Error waiting for a debug connection: Bad state: No element). This could be a problem with the Android Emulator, but this could be investigated more.
But the most interesting point for us is what happens with SDK 21 : the flutter_sound example crashs during stopRecorder, and this is certainly a problem for us.
I am in the process of debugging the last point and will not do anything else until this point fixed. So no worry : this is just a matter of hours, or perhaps a few days before fixed.
OK, guys and girls,
The crash that I have on SDK 21 occurs also with flutter_sound 1.6.0.
I really think that downgrade the master branch downto 1.6.0 would not be a good idea.
Working on so old SDK on Emulators is very challenging. When I look on Google android media recorder android simulator I found many official informations from Google itself, that Media Recorder is not supported on Android Simulator.
In fact, I can run flutter_sound on my Emulator since SDK 22, but not before. (I have just a problem that the sound is not really played on my computer, but it still seems OK except that).
If someone has a real Android device running SDK 21 or before, he/she can do some test. But you must realise that SDK 21 release date is November 2014. This is an eternity.
Update: I forgot to mention that on SDK 21, it is very simple to crash the emulator : just start and stop immediately the Media Recorder. I do not think that the crash is from flutter_sound
I isolated this small snippet from 1.6.0, to run it on SDK 21, WITHOUT FLUTTER_SOUND. Just a simple Android app :
import android.media.MediaRecorder;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import io.flutter.app.FlutterActivity;
public class MainActivity extends FlutterActivity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
String DEFAULT_FILE_LOCATION = Environment.getExternalStorageDirectory().getPath() +
"/default.aac";
recorder.setOutputFile(DEFAULT_FILE_LOCATION);
try
{
recorder.prepare();
recorder.start(); // Recording is now started
recorder.stop();
recorder.reset(); // You can reuse the object by going back to setAudioSource() step
recorder.release(); // Now the object cannot be reused
} catch (Exception e)
{
//Log.e(TAG, "Exception: ", e);
}
}
}
This very small app crashes on recorder.stop(), exactly same as flutter_sound. I am now really sure that the crash is not flutter_sound fault. It could be my environment (I am running the last SDK tools on Macos), but more probably this is a problem with SDK 21 (or perhaps the Android Emulator?).
I am sorry, but I cannot do more
@Larpoux No need to be sorry! Thank you for your time and for investigating the issue.
Can anyone else also try to change the min sdk and test it out?
Also, happy new year~! 🎈
Version 1.5.2 of the library is working on my Android device with 19 api level. Probably there's something major change that break the last version.
I am looking to that issue this afternoon
On 7 Jan 2020 at 11:14 +0100, Joielechong notifications@github.com, wrote:
Version 1.5.2 of the library is working on my Android device with 19 api level. Probably there's something major change that break the last version.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
OK guys and girls,
I confirm : there is really a problem for supporting very old Android SDK with the new version.
There is two problems :
Those two new functionalities are incompatible with so old SDK. I understand that compatibility with SDK 19 is important for some users. But at the same time, I really need those two new capabilities.
I am studying a way to be compatible with SDK 19 for users who need that, but permitting to use the new functions for users who do not have those compatibility issues.
Sorry for the inconvenience : I will publish a fix soon (a few days). I apologise.
@hyochan : do you have any suggestion ? Graddle ?
If you want to support the older version, then we need to make a manual installation guide for those who need OGG/OPUS. However, if this work is a burden for you, we can deprecate the below SDK for now and guide users to use an older version of flutter_sound. Which one do you prefer @Larpoux ?
Yes. I will do that tomorrow. Thanks
On 7 Jan 2020 at 17:50 +0100, Hyo Chan Jang notifications@github.com, wrote:
If you want to support the older version, then we need to make a manual installation guide for those who need OGG/OPUS.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Tomorrow I will work also on the iOS side, to allow a linkedit without FFmpeg for users who does not need OGG/OPUS. We will have a special version for users who need OGG/OPUS, and a regular one for those who do not need those functionalities on iOS and Android.
If you want to support the older version, then we need to make a
manualinstallation guide for those who needOGG/OPUS. However, if this work is a burden for you, we can deprecate the below SDK for now and guide users to use an older version offlutter_sound. Which one do you prefer @Larpoux ?
I prefer to try to support old Android SDK (and iOS without FFmpeg) for users who do not need OPUS codec. Probably many users are not interested by OPUS, and we must support them.
I'm getting the following error. Any plans to support on old phones i.e sdk 19?
AndroidManifest.xml Error:
uses-sdk:minSdkVersion 19 cannot be smaller than version 22 declared in library [:flutter_sound]
Suggestion: use a compatible library with a minSdk of at most 19,
or increase this project's minSdk version to at least 22,
or use tools:overrideLibrary="com.dooboolab.fluttersound" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
This has been resolved in 1.9.0 with the help of @Larpoux 🎉
Thank you very much for your time and hard work @Larpoux !!
Thank you to you @joielechong . This is a pleasure for me to program and I am very happy when people are glad of my work. Maintenance is always a priority and I know that I will probably have to maintain again flutter_sound in the future.
But my positive plan will be to support OGG/OPUS both for recording and playing both on iOS and Android. I really need this feature on my own App. AAC is good but flutter_sound merits others codec too. I am very busy with my own app and days are too short.
Most helpful comment
Remove the ^ character from your import like this => flutter_sound: 1.6.0