flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.32k stars 27.28k forks source link

Flutter Compile Debug Kotlin Issue Project Not Debugging In Emulators #84329

Closed Isuru01 closed 3 years ago

Isuru01 commented 3 years ago

Hi, I'm new to flutter and mobile app development. I updated my flutter version last week after that created a new flutter project. I used audioplayers: ^0.19.0 package for my project. But now I couldn't run my project in emulators because below error message.

`FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':audioplayers:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 50s

Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
flutter`

I have no idea about this error message. I did some search about this error in google and found this error caused my flutter version. Is that right? Please can you guys help me to fix this issue. I will attach my main.dart file in below.

import 'package:flutter/material.dart';
import 'package:audioplayers/audioplayers.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Simple Music'),
          backgroundColor: Colors.amber[300],
        ),
        body: SafeArea(
          child: Center(
            child: TextButton(
              child: Text("music"),
              onPressed: () {
                final player = AudioCache();
                player.play("note2.wav");
              },
            ),
          ),
        ),
      ),
    );
  }
}
TahaTesser commented 3 years ago

Hi @Isuru01 Can you please reproduce the issue without audioplayers Please provide your flutter doctor -v, your flutter run -v, your pubspec.yaml, a minimal reproducible code sample that does not use 3rd party plugins, your complete flutter run -v logs running the minimal code sample Thank you

darshankawar commented 3 years ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v. All system setups can be slightly different, so it's always better to open new issues and reference related issues.

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.