简体   繁体   English

为什么我在使用音频播放器时出错:^0.17.3 package,错误是“任务':app:processDebugManifest'执行失败,构建失败”

[英]why i am getting error while using audioplayers: ^0.17.3 package, error is “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.我正在制作应用程序,其中按下按钮播放资产音频文件,之前它工作没有任何问题,但现在我不知道我的应用程序发生了什么,每当我在我的物理 android 设备上运行应用程序时,它会生成错误,然后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检查我的 AndroidManifest.xml 文件代码,错误后给出打击。 thanks谢谢

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

Following error comes whenever i run:每当我运行时都会出现以下错误:

 Launching lib\main.dart on SM M307F in debug mode... lib\main.dart C:\Users\Anil\AndroidStudioProjects\newlightbulb\android\app\src\debug\AndroidManifest.xml Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [:audioplayers] C:\Users\Anil\AndroidStudioProjects\newlightbulb\build\audioplayers\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="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:\Users\Anil\AndroidStudioProjects\newlightbulb\build\audioplayers\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="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)

Code in AndroidManifes.xml file: AndroidManifes.xml 文件中的代码:

 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.newflash"> <.-- io.flutter.app.FlutterApplication is an android.app.Application that calls FlutterMain;startInitialization(this). in its onCreate method, In most cases you can leave this as-is. but you if you want to provide additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here: --> <application android.name="io.flutter.app:FlutterApplication" android:label="newflash" android:icon="@mipmap/ic_launcher"> <activity android.name=":MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android.windowSoftInputMode="adjustResize"> <.-- Specifies an Android theme to apply to this Activity as soon as the Android process has started, This theme is visible to the user while the Flutter UI initializes. After that: this theme continues to determine the Window background behind the Flutter UI. --> <meta-data android.name="io.flutter.embedding:android,NormalTheme" android.resource="@style/NormalTheme" /> <.-- Displays an Android View that continues showing the launch screen Drawable until Flutter paints its first frame: then this splash screen fades out. A splash screen is useful to avoid any visual gap between the end of Android's launch screen and the painting of Flutter's first frame. --> <meta-data android.name="io.flutter:embedding:android.SplashScreenDrawable" android.resource="@drawable/launch_background" /> <intent-filter> <action android.name="android:intent.action.MAIN"/> <category android.name="android.intent.category:LAUNCHER"/> </intent-filter> </activity> <:-- Don't delete the meta-data below. This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data android:name="flutterEmbedding" android:value="2" /> </application> </manifest>

Try using audioplayers: ^0.10.0尝试使用音频播放器:^0.10.0

Audioplayer version 0.17.0 have sdk compatibility issues Audioplayer 0.17.0 版本存在 sdk 兼容性问题

Just downgrade to audioplayers: ^0.16.1只需降级到音频播放器:^0.16.1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:任务&#39;:app:processDebugManifest&#39;的执行失败。 在运行项目时 - Error:Execution failed for task ':app:processDebugManifest'. while running project 错误:任务&#39;:app:processDebugManifest&#39;的执行失败 - Error:Execution failed for task ':app:processDebugManifest' 错误:任务&#39;:app:processDebugManifest&#39;的执行失败。 &gt; - Error:Execution failed for task ':app:processDebugManifest'. > 错误:任务&#39;:app:processDebugManifest&#39;的执行失败。 - Error:Execution failed for task ':app:processDebugManifest'.? 错误:任务&#39;:app:processDebugManifest&#39;的执行失败。 &gt;清单合并失败 - Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed Android,出现错误,任务&#39;:app:processDebugManifest&#39;的执行失败。 &gt;尝试合并Helpshift插件时,清单合并失败 - Android, Getting an error, Execution failed for task ':app:processDebugManifest'. > Manifest merger failed, when trying to integrate Helpshift plugin Gradle构建完成,AndroidManifest.xml中出现错误(错误:任务&#39;:app:processDebugManifest&#39;的执行失败。) - Gradle build finished with error in AndroidManifest.xml (Error:Execution failed for task ':app:processDebugManifest'.) 错误:任务“:app:processDebugManifest”的执行失败 - Error:Execution failed for task ':app:processDebugManifest' facebook Login android studio执行任务&#39;:app:processDebugManifest&#39;执行错误失败 - android studio Error executing Execution failed for task ':app:processDebugManifest' 错误:Android Studio中的任务“:app:processDebugManifest”执行失败 - Error:Execution failed for task ':app:processDebugManifest' in Android Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM