suragch / flutter_audio_service_demo

Companion project for Flutter audio_service tutorial
https://suragch.medium.com/background-audio-in-flutter-with-audio-service-and-just-audio-3cce17b4a7d?sk=0837a1b1773e27a4f879ff3072e90305
MIT License
58 stars 29 forks source link

Unable to instantiate activity ComponentInfo #26

Open temirfe opened 4 months ago

temirfe commented 4 months ago

Pull and run starter gives error on android:

E/AndroidRuntime(29868): FATAL EXCEPTION: main
E/AndroidRuntime(29868): Process: dev.suragch.flutter_audio_service_demo, PID: 29868
E/AndroidRuntime(29868): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{dev.suragch.flutter_audio_service_demo/com.ryanheise.audioservice.AudioServiceActivity}: java.lang.ClassNotFoundException: Didn't find class "com.ryanheise.audioservice.AudioServiceActivity" on path: DexPathList[[zip file "/data/app/~~KBWkirdxZZXWpdKJp19QHg==/dev.suragch.flutter_audio_service_demo-Bn3duJw9hwgCmYp99YlYMg==/base.apk"],nativeLibraryDirectories=[/data/app/~~KBWkirdxZZXWpdKJp19QHg==/dev.suragch.flutter_audio_service_demo-Bn3duJw9hwgCmYp99YlYMg==/lib/arm64, /data/app/~~KBWkirdxZZXWpdKJp19QHg==/dev.suragch.flutter_audio_service_demo-Bn3duJw9hwgCmYp99YlYMg==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]

my flutter doctor:

[✓] Flutter (Channel stable, 3.22.1, on macOS 11.7.10 20G1427 darwin-x64, locale en)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS and macOS development.
      Download at: https://developer.apple.com/xcode/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.90.2)
[✓] Connected device (3 available)
[✓] Network resources
suragch commented 4 months ago

Every now and then I just delete the android folder and recreate it. You might try doing that. Eventually I'll get around to updating the repo but I'm a little busy these days.