Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
300 views
in Technique[技术] by (71.8m points)

Flutter: Android: Using audioplayers: ^0.17.3 package generats error, Execution failed for task ':app:processDebugManifest', Build failed

I'm making app in which pressing a button plays assets audio file, earlier it was working without any problem but now i don't know what happend to my app, whenever i run app on my phisical android device, it generates error, then i update package's version number from ^0.17.0 to ^0.17.3 in pubspec.yaml but even then problem is same, but if i remove audioplayer package line from pubspec.yaml then app runs well, what happen to app please check, also check my AndroidManifest.xml file code given blow after error. thanks

Package link: https://pub.dev/packages/audioplayers

Following error comes whenever i run:

Launching libmain.dart on SM M307F in debug mode...
 libmain.dart
C:UsersAnilAndroidStudioProjects
ewlightbulbandroidappsrcdebugAndroidManifest.xml Error:
    uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [:audioplayers] C:UsersAnilAndroidStudioProjects
ewlightbulbuildaudioplayersintermediateslibrary_manifestdebugAndroidManifest.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="xyz.luan.audioplayers" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [:audioplayers] C:UsersAnilAndroidStudioProjects
ewlightbulbuildaudioplayersintermediateslibrary_manifestdebugAndroidManifest.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="xyz.luan.audioplayers" to force usage (may lead to runtime failures)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 36s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
question from:https://stackoverflow.com/questions/66050001/flutter-android-using-audioplayers-0-17-3-package-generats-error-execution

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Audioplayer version 0.17.0 have sdk compatibility issues

Just downgrade to audioplayers: ^0.16.1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...