我正在创建一个简单的游戏在颤动,飞镖和火焰,我的火焰是更新的版本与颤动相同,
C:\Users\Users\Desktop\vcflutter\flutter_application_1\lib\Flutter Game\flutter_application_1\android\app\src\debug\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [:audioplayers] C:\Users\Users\Desktop\vcflutter\flutter_application_1\lib\Flutter Game\flutter_application_1\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)
我的pubspec.yaml
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flame: ^0.29.0
cupertino_icons: ^1.0.0
dev_dependencies:
flutter_test:
sdk: flutter
我的主飞镖
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flame/util.dart';
import 'package:flutter/services.dart';
import 'package:flutter_application_1/langaw-game.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
Util flameUtil = Util();
await flameUtil.fullScreen();
await flameUtil.setOrientation(DeviceOrientation.portraitUp);
LangawGame game = LangawGame();
runApp(game.widget);
}
langaw-game.dart
import 'dart:ui';
import 'package:flame/game.dart';
class LangawGame extends Game {
Size screenSize;
double tileSize;
@override
void render(Canvas canvas) {
Rect bgRect = Rect.fromLTWH(0, 0, screenSize.width, screenSize.height);
Paint bgPaint = Paint();
bgPaint.color = Color(0xff576574);
canvas.drawRect(bgRect, bgPaint);
}
@override
void update(double t) {}
@override
void resize(Size size) {
super.resize(size);
screenSize = size;
tileSize = screenSize.width / 9;
}
}
我按照这个文档在youtube https://www.youtube.com/watch?v=N4LFV9_fLAo
这是个诡计(避免标题问题)
使用
<uses-sdk tools:overrideLibrary="xyz.luan.audioplayers"/>
此外,将此添加到< code>manifest标记中:
xmlns:tools="http://schemas.android.com/tools"
总文件内容:
<!-- Generated file. Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="nct.mobile.flutter.module"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<!--
Issue : https://stackoverflow.com/questions/66167083/uses-sdkminsdkversion-16-cannot-be-smaller-than-version-23-declared-in-library
Docs : https://stackoverflow.com/questions/27095077/how-do-i-use-toolsoverridelibrary-in-a-build-gradle-file
-->
<uses-sdk tools:overrideLibrary="xyz.luan.audioplayers, io.flutter.plugins.pathprovider"/>
<application tools:node="merge">
<meta-data
android:name="flutterProjectType"
android:value="module" />
<!-- Don't delete the meta-data below.
It is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
在您的gradle文件中,只需将minSdkVersion更新为23
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.oaics.customer"
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
错误:任务“app:processDebugManifest”的执行失败。 清单合并失败:uses-sdk:minSdkVersion 7不能小于库中声明的版本14[com . Android . support:app compat-V7:26 . 0 . 0-alpha 1]E:\ WorkSpace \ and studio \ Test1 \ app \ build \ intermedi
我正在尝试将火基添加到我的颤振项目中。我收到此错误: 我最近将我的flutter更新到verison 2.8.1,我试图更改我的minSdk,但没有成功。 这是完整的日志: 请有人帮我解决这个问题。
生成我的应用时产生以下错误 错误:任务执行失败:应用程序:processDebugManifest。 清单合并失败:使用sdk:MinSDK版本15不能不同于库C:\Users\Sybren PC\AndroidStudio项目\Tutorial\app\build\intermediates\Breaked aar\com.android.support\appcompat-v7\21.0.0-
在尝试重建项目时,我在项目中遇到以下错误: 错误:任务“:app:processDebugManifest”的执行失败。 清单合并失败:uses sdk:Minsdk版本8不能小于库[com.google.android.gms:play services:9.4.0]中声明的版本9 C:\Users\Esprit\Desktop\ColoringBook\app\build\intermedia