为什么我在使用音频播放器时出错:^0.17.3程序包,错误是"对任务'执行失败:app:process DebugManifest',生成失败" [英] why i am getting error while using audioplayers: ^0.17.3 package, error is "Execution failed for task ':app:processDebugManifest', Build failed"

查看:46
本文介绍了为什么我在使用音频播放器时出错:^0.17.3程序包,错误是"对任务'执行失败:app:process DebugManifest',生成失败"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个应用程序,其中按一个按钮播放资产音频文件,以前它工作没有任何问题,但现在我不知道我的应用程序发生了什么,每当我在我的物理安卓设备上运行应用程序时,它生成错误,然后我在pubspec.yaml中将包的版本号从^0.17.0更新到^0.17.3,但即使这样问题也是一样的,但如果我从pubspec.yaml中删除AudioPlayer包行,那么应用程序运行得很好,应用程序发生了什么请检查,也检查我的androidManifest.xml文件代码错误后给了打击。谢谢

套餐链接: https://pub.dev/packages/audioplayers

每当我运行时出现以下错误:

数据-lang="js"数据-隐藏="假"数据-控制台="真"数据-巴贝尔="假">
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)

androidManifes.xml文件中的代码:

数据-lang="js"数据-隐藏="假"数据-控制台="真"数据-巴贝尔="假">
<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>

推荐答案

音频播放器0.17.0版存在软件开发工具包兼容性问题

仅降级到音频播放器:^0.16.1

这篇关于为什么我在使用音频播放器时出错:^0.17.3程序包,错误是&quot;对任务&#39;执行失败:app:process DebugManifest&#39;,生成失败&quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
移动开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆