首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Flutter Android资源链接失败,无法应用插件[id 'kotlin-android']

Flutter Android资源链接失败,无法应用插件[id 'kotlin-android']
EN

Stack Overflow用户
提问于 2021-03-30 00:05:35
回答 1查看 304关注 0票数 0

2个月后打开一个项目,得到空-安全错误更改了一些插件,并升级了其他插件,一件事导致另一件事,现在我被这个错误卡住了!

尝试清理Flutter并删除build和.gradle文件夹,但都不起作用。

代码语言:javascript
复制
    Launching lib\main.dart on RMX1801 in debug mode...
    lib\main.dart:1
    3
    registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app:processDebugResources'.
    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
       > Android resource linking failed
         C:\Users\Dell\.gradle\caches\transforms-2\files-2.1\b94a6b46912fba96397655c3d1ce5de0\play-services-ads-lite-19.6.0\AndroidManifest.xml:27:5-38:15: AAPT: error: unexpected element <queries> found in <manifest>.
    
    
    * 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 8m 59s
    The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
    Building plugin audioplayers...
    Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
    
    FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Dell\flutter\.pub-cache\hosted\pub.dartlang.org\audioplayers-0.18.2\android\build.gradle' line: 25

* What went wrong:
A problem occurred evaluating root project 'audioplayers'.
> Failed to apply plugin [id 'kotlin-android']
   > The current Gradle version 4.10.2 is not compatible with the Kotlin Gradle plugin. Please use Gradle 5.3 or newer, or the previous version of the Kotlin plugin.

* 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 54s
2

Exception: The plugin audioplayers could not be built due to the issue above.
Exited (sigterm)
EN

回答 1

Stack Overflow用户

发布于 2021-03-30 02:08:47

你得到了一个AAPT: error: unexpected element <queries> found in <manifest>.,看起来你必须更新你的gradle版本到这里列出的版本之一

https://github.com/miguelpruivo/flutter_file_picker/wiki/Troubleshooting

3.3.3

3.4.3

3.5.4

3.6.4

4.0.1

看起来你需要降级你的gradle版本,因为你使用的是4.10.2

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66857592

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档