flutter报Execution failed for task ‘:app:processDebugResources‘.

* 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\Administrator\.gradle\caches\transforms-2\files-2.1\0a464bb45458a26490ba760405d843f8\core-1.7.0-alpha02\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.


* 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 22s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.

Creating `android\settings_aar.gradle`...
[!] Flutter tried to create the file `android\settings_aar.gradle`, but failed.
To manually update `settings.gradle`, follow these steps:

1. Copy `settings.gradle` as `settings_aar.gradle`
2. Remove the following code from `settings_aar.gradle`:

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

Exception: Please create the file and run this command again.

解决方法

新建settings_aar.gradle文件
 

flutter报Execution failed for task ‘:app:processDebugResources‘._第1张图片

 内容是

flutter报Execution failed for task ‘:app:processDebugResources‘._第2张图片

 

你可能感兴趣的:(flutter,android)