Flutter WooCommerce App Build Fails with permission_handler_android:extractDebugAnnotations Exception

70 Views Asked by At

I'm working on a Flutter consumer app using a premade Flutter WooCommerce app purchased from the Envato Market. When attempting to run the source code, I encounter a build exception specifically related to the permission_handler_android task. Below is the error message I receive:

Execution failed: permission_handler_android:extractDebugAnnotations

In my project structure on Android Studio, I'm using the following SDKs and JDK version: Flutter SDK version: 3.16.0, Dart SDK version: 3.2.1, Android SDK: Android API 34, extension level 7 Platform, Kotlin version: 1.8.0, JDK: jdk-17, compileSdkVersion: 34, targetSdkVersion: 33, permission_handler version: 10.4.3

I have already tried the following steps without success:

  1. Running flutter clean and flutter pub get to clear caches and fetch dependencies.
  2. Ensuring that all dependencies in pubspec.yaml are up to date.
  3. Checking for compatibility issues between the app and my current Flutter SDK version.
  4. I changed the compileSdkVersion and targetSdkVersion to the same version, such as 34 and 33, but I was facing the same exception each time as mentioned previously.

Expected Outcome: I expected the build process to complete successfully without any exceptions, allowing me to run and test the Flutter consumer app.

1

There are 1 best solutions below

0
Jannik On

There were two issues created. One issue in 2021 which has a similar error. Try updating the ext.kotlin_version in android/build.gradle to the current version. And another issue which states that the compileSdkVersion in the same file has to be greater than 32.

Maybe an update of the package permission_handler in the pubspec.yaml could help.