I try to build my my Flutter project i get this error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform permissions-3.8.aar (com.nabinbhandari.android:permissions:3.8) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not find permissions-3.8.aar (com.nabinbhandari.android:permissions:3.8).
Searched in the following locations:
https://jcenter.bintray.com/com/nabinbhandari/android/permissions/3.8/permissions-3.8.aar
https://jcenter.bintray.com/com/nabinbhandari/android/permissions/3.8/permissions-3.8.jar
* 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 21s
Error: Gradle task assembleDebug failed with exit code 1
Already tried to adjust my build.gradle according to this: https://github.com/jonataslaw/VideoCompress/issues/207
buildscript {
ext.kotlin_version = '1.9.0'
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
This is my SDK
compileSdkVersion = 34
Not sure what causes this error. It worked in the past.
Flutter Version:
PS C:\Users\muela\StudioProjects\sca\v1.0\carereporter\safesense_carereporter> flutter --version
Flutter 3.22.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision a14f74ff3a (3 months ago) • 2024-05-22 11:08:21 -0500
Engine • revision 55eae6864b
Tools • Dart 3.4.1 • DevTools 2.34.3
Any idea how to fix that issue?
Even I faced a problem with com 'com.nabinbhandari.android:permissions:3.8'. After a lot of searching, I found out a fork dependency and it worked for me. You can check it out here: https://github.com/nabinbhandari/Android-Permissions/issues/28#issuecomment-846410920
I used this in my java project, and hopefully it works for you in flutter. Cheers.