Home > Net >  can´t compiling flutter Geolocator using LInux Mint #882
can´t compiling flutter Geolocator using LInux Mint #882

Time:10-23

My project is a simple app to print longitude and latitude

I´m using: Linux Mint 19.3

classpath 'com.android.tools.build:gradle:4.1.3'

compileSdkVersion 31

and the results of the compilation is show below:


FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:processDebugResources'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform play-services-base-17.0.0.aar (com.google.android.gms:play-services-base:17.0.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: /home/luis/.gradle/caches/transforms-2/files-2.1/bb3cc3ced1388fcd9c0c925717b75148/jetified-play-services-base-17.0.0.
> AAPT2 aapt2-4.1.3-6503028-linux Daemon #6: Unexpected error during compile '/home/luis/.gradle/caches/transforms-2/files-2.1/bb3cc3ced1388fcd9c0c925717b75148/jetified-play-services-base-17.0.0/res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png', attempting to stop daemon.

CodePudding user response:

How about minSDKVersion ? try with: compileSdkVersion 31 minSdkVersion 21 targetSdkVersion 29 and geolocator: ^7.6.0

CodePudding user response:

It's related to your local cache. There are two ways to solve this.

  1. Try fluter pub cache repair.
  2. Open Your Project ProjectName/android project in android studio and syn Gradle. And build it through the android studio.
  • Related