当我在android studio中启动flutter应用程序时,出现此错误。 有人可以帮帮我吗? 我是一个业余程序员,但遇到此错误。我有Windows 10
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\USUARIO\.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
> Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\USUARIO\.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
> Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\USUARIO\.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
> Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\USUARIO\.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
> Failed to transform artifact 'core.aar (androidx.core:core:1.1.0)' to match attributes {artifactType=android-res}.
> Execution failed for AarTransform: C:\Users\USUARIO\.gradle\caches\transforms-2\files-2.1\a528b13ac93e64cafa3d0480e2c93207\core-1.1.0.
> Cannot parse result path string:
* 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 2m 11s
Exception: Gradle task assembleDebug failed with exit code 1
答案 0 :(得分:0)
如果您尝试从其他人运行应用程序,则项目中的版本必须存在问题,请转到android => build.gradle并检查版本,例如classpath'com.android.tools.build:gradle:3.5.0' 如果您不熟悉Flutter,最好从一个空项目开始: 颤抖地创建yourAppName