I’m restarting work on a Flutter project from July, and I’ve been having tons of dependency issues, that I’m slowly working through. However, this one I just can’t get rid of.
Launching libmain.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
Parameter format not correct -
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:UsersEduardo CamposDesktopINESC TECihandu_app-masteriHandUappbuildappintermediatespackaged_manifestsdebugAndroidManifest.xml:40: AAPT: error: attribute android:usesPermissionFlags 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 10s
Exception: Gradle task assembleDebug failed with exit code 1
Nothing I do gets me rid of this. I tried cleaning the Flutter build and cache countless times and nothing…
gradle.properties:
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
Gradle-wrapper.properties :
#Tue Jan 19 10:38:00 GMT 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl = https://services.gradle.org/distributions/gradle-6.8.1-all.zip
project-level build.gradle :
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I don’t recal anything else you might need, but I’ll provide you with anything. Needless to say this doesn’t seem to have anything to do with flutter…
Also, I’m on Windows, but on MacOS the same problems occur.
2
Answers
Turns out a variety of things needed to be corrected in both project-level and app-level
build.gradle
andgradle.properties
.In
gradle.properties
changedto
In the app-level
build.gradle
changed bothto
In the project-level
gradle.build
changed:to
and
to
Afterwards, all the dependencies fell in place,
flutter pub get
ran with success and I managed to build my project on my Windows machine. However, on MacOS, some of my dependencies still don't suppor the M1 chip, but the issue is being delt with and until them guess I'll stick to Windows/Linux.Obs: the package is
flutter_blue
if anyone is curious.You probably have a code issue , there is usesPermissionFlags not included correctly . the suggested answer here tells your miss using the bind variable
@{ }