Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.



Get Started Now!

Fixing the “Failed to Transform FishBun-0.11.2.aar” Error in Flutter

If you’ve been working with Flutter and encountered the dreaded Failed to transform FishBun-0.11.2.aar error while building your app, you’re not alone. This issue typically arises when using certain outdated or conflicting dependencies, which result in Gradle failing to resolve files or transform artifacts.

In this blog post, I’ll walk you through the steps to identify the cause of this error and provide a straightforward solution.


Understanding the Error

Here’s the full error message you might see in your console:

Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform FishBun-0.11.2.aar (com.sangcomz:FishBun:0.11.2) to match attributes {artifactType=android-assets, org.gradle.category=library, ...}.
     > Could not find FishBun-0.11.2.aar (com.sangcomz:FishBun:0.11.2).
       Searched in the following locations:
       https://jcenter.bintray.com/com/sangcomz/FishBun/0.11.2/FishBun-0.11.2.aar

This issue occurs because the FishBun library and its dependencies were hosted on JCenter, which has been deprecated and is no longer available.


Steps to Fix the Error

1. Identify the Problematic Dependency

The core problem is the dependency multi_image_picker (or its newer version, multi_image_picker2), which internally relies on the outdated FishBun library.

2. Analyze Your pubspec.yaml File

If you’re using either multi_image_picker or multi_image_picker2, you’ll need to comment out or remove them to eliminate this error. These packages are no longer actively maintained and can cause compatibility issues.

Here’s an example of a problematic pubspec.yaml configuration before the fix:

dependencies:
  permission_handler: ^11.0.1
  dropdown_search: ^5.0.6
  multi_image_picker: ^4.8.0
  # multi_image_picker2: ^5.0.02
  numberpicker: ^2.0.1

3. Remove or Replace the Dependency

You can fix the issue by commenting out multi_image_picker and multi_image_picker2 like this:

dependencies:
  permission_handler: ^11.0.1
  dropdown_search: ^5.0.6
  # multi_image_picker: ^4.8.0
  # multi_image_picker2: ^5.0.02
  numberpicker: ^2.0.1

4. Clean and Rebuild the Project

After making these changes, run the following commands to clean and rebuild your project:

flutter clean
flutter pub get
flutter run

Why Does This Work?

By removing the multi_image_picker package, you effectively remove the dependency on FishBun, which relies on JCenter. Since JCenter is deprecated, Gradle fails to locate the necessary files, leading to the build error. Commenting out or replacing the outdated package resolves the issue.


Recommended Alternatives

If you need to use a package for selecting multiple images, consider using these actively maintained alternatives:

  • ImagePicker: The official Flutter plugin for picking images and videos from the gallery or camera.
  • FilePicker: A versatile plugin for picking any type of file, including images.

Related Posts

Why DevOps Consulting is Essential for Modern Enterprises

In today’s fast-paced digital landscape, businesses must adapt quickly to stay competitive. Traditional software development and IT operations models often lead to bottlenecks, inefficiencies, and deployment delays….

Comprehensive DevOps Support: Enhancing Efficiency and Performance

In the fast-paced world of software development, implementing DevOps has become essential for achieving agility, efficiency, and seamless collaboration between development and operations teams. However, managing DevOps…

Why Your Business Needs a DevOps Consultant for Seamless Digital Transformation

In today’s fast-paced digital world, businesses must adopt innovative approaches to remain competitive. One of the most critical strategies for achieving operational efficiency and agility is implementing…

Test Database Connection is ok or not

Laravel provides an interactive shell called Tinker, which allows you to test database connections easily. Run: Then, in the interactive shell, try the following: If your connection…

The Ultimate Guide to Hiring the Best DevOps Freelancers for Your Business

In today’s fast-paced digital landscape, businesses are increasingly relying on DevOps freelancers to optimize their software development and IT operations. With the flexibility of freelance professionals, companies…

Master DevOps Skills with the Best DevOps Training Program

In today’s fast-paced IT landscape, DevOps has become a game-changer for businesses aiming to streamline software development and operations. Organizations are increasingly adopting DevOps methodologies to enhance…

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x