我正在制作按下按钮播放资产音频文件的应用程序,早些时候它工作没有任何问题,但现在我不知道我的应用程序发生了什么,每当我在我的物理android设备上运行应用程序时,它都会生成错误,然后我更新包的版本号从^0.17.0到^0.17.3pubspec.yaml但即使这样问题也是一样的,但如果我从pubspec.yaml删除audioplayer包行,那么应用程序运行良好,应用程序会发生什么,请检查,还检查我的AndroidManifest.xml文件代码错误后给予打击。谢谢
包链接:https://pub.dev/packages/audioplayers
每次运行时都会出现以下错误:
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)
AndroidManifes.xml文件中的代码:
html lang-html prettyprint-override"><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>
Audioplayer版本0.17.0存在sdk兼容性问题
只需降级为音频播放器:^0.16.1
尝试使用音频播放器:^0.10.0
错误:任务“:app:checkdebugaarmadata”的执行失败 发生多个任务操作失败:执行com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction时发生失败
应用程序构建错误:'app:checkDebug重复类' 我知道通过删除一个类可以解决此错误,但我不知道如何删除它,或者有任何其他方法可以解决此问题。 谢啦 失败:生成失败,出现异常。问题:任务“:app:checkDebugDuplicateClasss”的执行失败。执行com.android.build.gradle.internal.tasks时出错。检查DuplicatesRunnable
我得到这些错误,当我运行我的代码。请任何想法,我怎么能修复这些?我升级了颤振,pubspeck.lock.我提到代码是旧的,我试图升级 > 尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。运行--扫描以获得完整的见解。 获取更多帮助https://help.gradle.org
当我要构建apk时,我收到此错误。 执行任务“app:transformClassesWithDexForDebug”失败。 这是错误的截图
谁有办法修好它?只是随机的...此处为完整stacktrace:
每当我运行、制作或清理项目时, 出现此错误消息。 我已经检查了我的资源文件好几次,没有出现致命错误。只有png图标和xml文件。 我不知道“-1”是什么意思。。 在我的主java文件中,有“无法解析符号R”错误。 我的应用程序昨晚启动得很好,但当我今天早上醒来运行android studio时,它失败了。 我该怎么办? 这是我的猎物 在下面,我添加了我的全部gradle输出,谢谢。 执行任务:[: