gpt4 book ai didi

Execution failed for task ':app:checkDebugAarMetadata(任务‘:app:check DebugAarMetadata’执行失败)

转载 作者:bug小助手 更新时间:2023-10-26 20:57:45 29 4
gpt4 key购买 nike




  • What went wrong:
    Execution failed for task ':app:checkDebugAarMetadata'.



A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.work:work-runtime:2.7.0-rc01.
AAR metadata file: C:\Users\100812.gradle\caches\transforms-2\files-2.1\8fcba37f766c3622d8dbd30df4e98577\work-runtime-2.7.0-rc01\META-INF\com\android\build\gradle\aar-metadata.properties.



更多回答

Hello, Can you share build.gradle file

你好,你能分享build.gradle文件吗

what you are trying to do?

你想做什么?

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

请澄清您的具体问题或提供额外的细节,以突出您的确切需求。就目前所写的来说,很难确切地说出你在问什么。

优秀答案推荐

you can find the compileSdkVersion under: android > app > build.gradle

你可以在android > app > build.gradle下找到compileSdkVersion


android {

compileSdkVersion 31

...

}


android {

compileSdkVersion 33

...

}


You can got error with the version 31, it’s not works, try this
it's works for me .

你可以得到错误的版本31,它不工作,试试这个,它是对我的工作。



Check with your configuration in android/app/src/build.gradle file
with new version of flutter compileSdk and targetSdkVersion are mention as below

使用新版Ffltter编译器检查您在android/app/src/build.gradle文件中的配置Sdk和Target SdkVersion如下


android {
compileSdkVersion flutter.compileSdkVersion
.....
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.app"
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}


I had faced the same issue, In case you cloned a GitHub repository and then when you run that code this is the error that comes up(as it happened with me) then Solution :

我曾经遇到过同样的问题,如果您克隆了一个GitHub存储库,然后当您运行该代码时,这是出现的错误(就像我发生的那样),然后解决方案:


Step 1 : Create a new flutter project at your local system

步骤1:在本地系统中创建新的颤动项目


Step 2 : Copy the code given in main.dart file of stub project and paste it into main.dart file of your local project

步骤2:复制存根项目的main.dart文件中给定的代码,并将其粘贴到本地项目的main.dart文件中


Step 3 : Make an 'assets' folder in your local project

步骤3:在本地项目中创建一个‘Assets’文件夹


Step 4 : download asset-files from GitHub and put them into your local 'assets' folder

步骤4:从GitHub下载资产文件,并将其放入本地的资产文件夹


Step 5 : in your local pubspec.yaml file, add dependency for your 'assets' folder

步骤5:在您的本地pubspec.yaml文件中,添加‘Assets’文件夹的依赖项


Step 6 : Rename MyApp() in widget testing file to MaterialApp()

步骤6:将微件测试文件中的MyApp()重命名为MaterialApp()


Hit save(in files other than pubspec.yaml), get all dependencies(in pubspec.yaml) and you're good to go

点击保存(在pubspec.yaml以外的文件中),获取所有依赖项(在pubspec.yaml中),然后就可以开始了


In short :
Copy the required code and the dependencies you want
Then Save the changes and run

简而言之:复制所需的代码和所需的依赖项,然后保存更改并运行


Error was there in my case mainly because the Flutter V2 has many changes and the code was outdated.

在我的情况下,错误主要是因为颤振V2有很多变化,代码过时了。



Go to android/app/build.gradle

进入安卓/APP/build.gradle


Change:
From: compileSdkVersion 29
To: compileSdkVersion 31

将:从:编译SdkVersion 29更改为:编译SdkVersion 31



Please run, then press f you will notice the SDK is the wrong version.
npx react-native doctor

请运行,然后按f键您会注意到SDK版本错误。NPX反应-本地医生


更多回答

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com