Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path_provider Installed, error still reported #72

Closed
cnqiuxue opened this issue Dec 27, 2018 · 6 comments
Closed

path_provider Installed, error still reported #72

cnqiuxue opened this issue Dec 27, 2018 · 6 comments

Comments

@cnqiuxue
Copy link

E/flutter (18314): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter (18314): MissingPluginException(No implementation found for method getTemporaryDirectory on channel plugins.flutter.io/path_provider)
E/flutter (18314): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:291:7)
E/flutter (18314):
E/flutter (18314): #1 getTemporaryDirectory (package:path_provider/path_provider.dart:24:38)
E/flutter (18314):
E/flutter (18314): #2 AudioCache.fetchToMemory (package:audioplayers/audio_cache.dart:54:37)
E/flutter (18314):
E/flutter (18314): #3 AudioCache.load (package:audioplayers/audio_cache.dart:72:37)
E/flutter (18314):
E/flutter (18314): #4 AudioCache.play (package:audioplayers/audio_cache.dart:87:23)
E/flutter (18314):
E/flutter (18314): #5 _MyHomePageState.initState (package:flutter_view/main.dart:75:16)
E/flutter (18314): #6 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3830:58)
E/flutter (18314): #7 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
E/flutter (18314): #8 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #9 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #10 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
E/flutter (18314): #11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #12 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
E/flutter (18314): #14 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
E/flutter (18314): #15 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
E/flutter (18314): #16 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
E/flutter (18314): #17 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #18 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #19 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
E/flutter (18314): #20 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #21 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #22 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
E/flutter (18314): #23 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #24 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #25 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
E/flutter (18314): #26 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #27 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #28 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4860:14)
E/flutter (18314): #29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #30 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #31 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
E/flutter (18314): #32 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
E/flutter (18314): #33 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
E/flutter (18314): #34 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
E/flutter (18314): #35 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
E/flutter (18314): #36 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #37 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #38 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
E/flutter (18314): #39 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
E/flutter (18314): #40 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
E/flutter (18314): #41 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
E/flutter (18314): #42 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
E/flutter (18314): #43 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
E/flutter (18314): #44 ComponentEl

@cnqiuxue
Copy link
Author

image
image

AudioCache audioCache = new AudioCache();

image
image
image

@luanpotter
Copy link
Member

You don't even need to import path_provided yourself on your app, it's already a dep. of audioplayers. Have you tried runnign flutter clean && flutter pub get again? Normally this solves these kinds of issues.

@erickzanardo
Copy link
Member

Closing due inactivity

@gurmukhp
Copy link

I'm having the exact same issue. Tried to clean and pub get but the same problem occurs.

The screenshots whilst are somewhat useful, don't actually provide any insight on what to do.

The code I've got is copied from the AudioCache docs:

static AudioCache player = AudioCache();
player.play('journey1.mp3');

@mingsai
Copy link

mingsai commented Feb 1, 2020

In my case this happens on Macos/Linux but is fine on iOS and Android.

[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method getTemporaryDirectory on channel plugins.flutter.io/path_provider)

@AgboVincent
Copy link

In my case I just comment
package io.flutter.plugins;

import androidx.annotation.Keep;
import androidx.annotation.NonNull;

import io.flutter.embedding.engine.FlutterEngine;
//import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry;

in GeneratedPluginRegistrant.java and it started working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants