hanabi1224 / flutter_appcenter_bundle

MIT License
20 stars 48 forks source link

build error occured on M1 macbook #25

Open deviankim opened 3 years ago

deviankim commented 3 years ago

Hi. I tried build flutter_appcenter_bundle/example. And I met error message below. How can I solve it?

android studio 4.1.1 flutter 1.22.5 dart 2.10.4

Execution failed for task ':flutter_appcenter_bundle:compileAppCenterDebugKotlin'.
> Could not resolve all artifacts for configuration ':flutter_appcenter_bundle:appCenterDebugCompileClasspath'.
   > Failed to transform flutter.jar to match attributes {artifactType=android-classes, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/ian/sdk/flutter/bin/cache/artifacts/engine/android-x64/flutter.jar.
         > Failed to transform '/Users/ian/sdk/flutter/bin/cache/artifacts/engine/android-x64/flutter.jar' using Jetifier. Reason: Cannot open a library at 'FileMapping(from=/Users/ian/sdk/flutter/bin/cache/artifacts/engine/android-x64/flutter.jar, to=/Users/ian/.gradle/caches/transforms-2/files-2.1/ae332f75ccdeb352c9663d23fe18cd86/jetified-flutter.jar)'. (Run with --stacktrace for more details.)
shubham26S commented 3 years ago

Hi, I am facing the same issue. This doesnt seems to be M1 specific. I have the exact same issue on MacBook Pro 2019 (Big Sur). Any fix for this?

deviankim commented 3 years ago

Hi, I am facing the same issue. This doesnt seems to be M1 specific. I have the exact same issue on MacBook Pro 2019 (Big Sur). Any fix for this?

Not yet. I just restored M1 macbook from my previously used one. And it works now. Sorry for helpless.

abd99 commented 3 years ago

I am facing the same issue. Does anyone have any fixes or workarounds?

abd99 commented 3 years ago

Try running flutter precache before running the build again. This worked for me.

anton-roos commented 3 years ago

@abd99 I want to thank you good sir! I have been struggling for 2 days now and flutter precache sorted it out.