One wrong activity caused me 10+ hours of debugging

One wrong activity caused me 10+ hours of debugging

BackerLeader posted 1 min read

The music app I vibe coded is working fine but I wanted to improve it. So I decided to add some extra features like playing in the background so that I can control playback from notification bar. Cool right ?

I also wanted to refactor my code because It would give me huge pain if I scale it just from here. I started working on it, I fixed all errors of refactoring but when I say

flutter run

It gives me an error which forced me scratch my head for days.

The Activity class declared in your AndroidManifest.xml is wrong...

Now I'm trying to fix things in xml file which I needed to actually make change in MainActivity.kt . The only thing I needed to replace below code

class MainActivity: FlutterFragmentActivity() {}

with this

class MainActivity: AudioServiceFragmentActivity() {}

Finally I'm a bit relieved. I did learn a lot as I actually reverse engineered code, refactored so much just to find answers. Now I really need a break lol.....................

0 votes
0 votes

More Posts

React Native Quote Audit - USA

kajolshah - Mar 2

AWS Account Locked! How One IAM Mistake Cost Me

Ijay - Mar 18

After facing weird permission issues, I built my own music app in 6 hours.

yogirahul - Jul 14, 2025

UI issues are beautiful.....

yogirahul - Jul 25, 2025

Fixing a Tricky Playback Issue in My Flutter Music App

yogirahul - Jul 24, 2025
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

2 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!