MissingPluginException(No implementation found for method hasPermissions on channel flutter_audio_recorder) - flutter

I use this plugin https://pub.flutter-io.cn/packages/flutter_audio_recorder. I have received the following error
enter image description here
i also write this code to ask the permission
await FlutterAudioRecorder.hasPermissions
and also add the permissions in Androidmenifiest.xml file
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
this code also does not ask the user to enable the permission for audio.
please tell me how to fix this issue?

Try to quit Flutter and run again. Also, make sure that you use the command flutter pub get before running your app. If you still get the same error, try flutter clean and run your app.

Related

I am having issues uploading my app to Google playstore

I have been trying to upload my flutter app to playstore, but it got rejected, I got an email like this below
This is how my pubspec.yaml file look like
my Androidmanifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
I was thinking maybe the permission_handler is the cause of the rejection,
but based on my research online, I believe it suppose to go through since I added this
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
I think you misunderstood the Google Playstore message.
They are telling you that your app shouldn't use this permission:
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
So you have two options:
Either Remove this permission request from your app or
argue with the Google Playstore support about why your app really needs this permission. They list a few allowed cases (web browsing as a core functionality for example)

(Flutter) Google Play Console: Issue found: Need to use Media Store API or No Access to Files

I am trying to publish my app on the Google Play Console. They are refusing it because it seems they don't like the permissions I gave to my app:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.basketball.cleanmaybe">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
I found how to ask permission to the camera app but not to the gallery. Can someone tell me how can I resolve this?
This is what I got in my mail:

Flutter Api not working with web and release apk but working in debugmide

Why Rest Api Not Working In Flutter Web and build apk only working(fetching info) in debug mode
Please check if you have added internet permission in android manifest
<uses-permission android:name="android.permission.INTERNET" />

MissingPluginException(No implementation found for method gps on channel top.kikt/gps)

I am trying to implement https://pub.dev/packages/gps. But while using it it is throwing following exception-
MissingPluginException(No implementation found for method gps on channel top.kikt/gps)
what is this exception and how to fix it.
note -I can not use other libraries it is necessary to implement this library.
i wrote this code to access current position but this piece of code returning null to me
var position = await Gps.currentGps();
build.gradle info
compileSdkVersion 28
minSdkVersion 16
targetSdkVersion 28
var position = await Gps.currentGps();
manifest permission I added-
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
Stop the running project
and run the command -
1)flutter clean
2)flutter pub get
and run the app again

getting error when using the dependency in flutter

when i add dependency to pubspec.yaml files ,in some dependency i get error ,i tried many to resolve it but i can't able to resolve it.
getting this error when using image picker dependency
i tried
flutter clean
restart the pc
reinstall the app
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method pickImage on channel plugins.flutter.io/image_picker)
Possible solutions to what might occur:
Pay attention to indentation in your pubspec.yaml file.
Make sure that you don't have any error on dependency version.
Make sure that you run flutter pub get after adding dependency
Probably it is not documented that you have to add following permission to Android manifest file:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
Sometimes it might be needed to clean cache and run the project again by using flutter clean && flutter run command on terminal.