"TargetPlatform.windows is not yet supported by the maps plugin" - How to solve this - flutter

Im just trying to get google maps displayed on my emulator and i also used google_maps_flutter package but TargetPlatform.windows is not yet supported by the maps plugin is displayed instead of the map, Im not receiving any error in the console.
I have added the meta-data entry containing the API key to AndroidManifest.xml file in android/app/src/main
Click this to see the output
Please help me to solve this?

add in dependencies:
google_maps_flutter_web: ^0.3.2+2

Here maybe the issue will be with your Maps Api key, remove all the restrictions of your api key from Google Cloud Platform , just like this

Either you're trying to run your project on Windows platform (meaning you did not choose an Android Emulator or phone in the run device menu, see example below)
or, if your screenshot is from a Android device, there's something messed up with your project configuration. You can try running flutter create . in the terminal to recreate your project, or you can create a new one from the scratch (watch out for which platform you activate, see below) and then import the code.
Screenshots are from Android Studio.

Related

Emulator not running the application

I am trying to setup flutter on my device, so far I have been able to download the flutter SDK and android studio and satisfy the conditions of flutter doctor to start learning android application development:-
flutter doctor
I ignored the absence of visual studio as I don't want my app to be compatible with windows(as I am trying to develop for Android) but I am not able to fix the missing java bundle, any help on how would I do that?
I just ignored it for a second and moved on to set up my emulator but on running, it shows a pop up which says "Attach a debugger or ESC to cancel"(the pop-up is something like this.) how would I fix it.
This doesn't run the app on the emulator so how would I fix that?
Also on trying to debug, it throws this error, I am totally confused on how to proceed further to at least run my app so that I could start developing and learning flutter?
I am following along this to run my application.
Edit:
I have the java bundle in place but don't know how would I configure Android Studio to get it.
java's prescence
Also that the emulator is now showing that the System UI is not responding and on closing it, it further shows this.
It's been a week since I am trying to work out the setup of flutter but some way or the other some issue happens, please help.
Thanks in advance.
you have to install java runtime environment and It'll work. get from here
it'll show like this if you have JDK installed properly.

Using AppCode with Flutter plugin

How can I use AppCode for the ios-specific parts of my Flutter plugin?
I've created the plugin with flutter create --template=plugin --platforms=ios myplugin
The command doesn't generate an XCode project or workspace for the plugin itself but it includes an example app for which it does generate these. Running flutter build ios in example then creates symlinks to the plugin code in example/ios/.symlinks that I can use to edit the actual Swift code with auto completion, code navigation etc. When I open these files in AppCode however, I get the below error and no coding assistance is available at all:
I previously used AppCode quite a lot to maintain some Flutter plugins' iOS code (but switched jobs and didn't need AppCode or Xcode). However, I recently started making a free app, and also wanted to contribute to a Flutter plugin for iOS, I wanted AppCode again. I got AppCode working again, so I wanted to share.
In your flutter directory:
For editing/debugging/running Flutter apps' iOS code: run appcode ios
For Flutter plugins, run appcode example/ios (not appcode ios)
Some principles:
The files don't show up immediately, use Command + Shift + O to find your file. Then Opt + F1 to show it in the project navigator.
Built at least once using flutter run or Xcode (to make sure configuration is set up).
You cannot escape Xcode. Xcode and AppCode are complementary. Find the balance 😂🤓. Refactoring code, debugging the application, searching and reading code works really well in AppCode. Xcode does reading configuration better or debugging builds.
If you get random errors (e.g. everything fails but the error is build failed in AppCode, you should open in Xcode or build/run the flutter app for iOS: flutter run and read the error messages.
If you want to debug both Flutter and iOS simultaneously, start the iOS debugger, then "Flutter attach" in android studio (maybe this is possible in VSCode too, but I don't use that).
Here's an example screenshot of AppCode with debugger working. You might be curious if telemetry flag you set in Flutter was actually being set in the iOS side... maybe there's a bug. But I take privacy seriously and confirm the telemetry is disabled. I also watch network traffic sometimes. 😂. If you're interested, you can then follow that to it's dependencies (manually, using by reading package.swift), and find out it is set to true by default.
UserDefaults.standard.register(defaults: [
#keyPath(UserDefaults.MGLMapboxMetricsEnabled): true
])

How to access the mobile device information using flutter

For example,i need the results of Manufacuturer name, Model name, Android version. In xamarin forms they provided the device information and other hardware level stuffs achieved through xamarin essentials https://learn.microsoft.com/en-us/xamarin/essentials/. Likewise i would like to get the details. please help me this. My current dart sdk version is 2.17.0-266.1.beta. Thanks in advance...
You can get current device information from within the Flutter application by using the device_info_plus package.
This supports all kinds of platforms, including Android, iOS, macOS, web, Linux, and Windows.
Documentation:
https://pub.dev/packages/device_info_plus
Go to your pubspec.yaml file, Check if this dependency it exists,
dependencies:
device_info_plus: ^3.2.3
then make sure to run this directly from the command line:
$ flutter packages get
now it should work!

App Action Test Tool Error "No Android Module with actions file reference found" with Flutter

I have written a Flutter app which implements several deep links with package uni_links. The deep links work correctly with adb commands. Then I created actions.xml in this path:
D:\Android\AndroidStudioProjects\FlutterProjects\garage_controller\android\app\src\main\res\xml\actions.xml
I also added the following lines in AndroidManifest.xml:
<meta-data
android:name="com.google.android.actions"
android:resource="#xml/actions" />
Android Studio highlighted "#xml/actions" in red and complains that it cannot resolve the symbol. I have other parts of AndroidManifest highlighted red. I guess these errors are because of Flutter.
I uploaded the app to Google Play and started internal testing. When I ran App Action Test Tool (AATT), I got the following error:
No Android Module with actions file reference found. You need one Android Module with an actions file reference.
My questions are:
Does App Actions work in a Flutter App?
Does AATT work on a Flutter App?
Why do I get the "cannot resolve symbol" error for "#xml/actions"? I think I put everything in the right place. Thanks for your help.
I got it fixed. Basically everything was done correctly in my Flutter app. The path of actions.xml was also correct. The issue is with AATT which does not know where to find actions.xml in a Flutter app. I just had to open the Android portion of the app in Android Studio. Then AATT knew where to find the file. Google did not put a lot of AI in its tool. More details in here: https://issuetracker.google.com/issues/204233238

Problem the install package flutter_map in the vscode and android studio

I get the following error when adding a package flutter map I do not know where the problem comes from ???
image log
enter image description here
I think you're an Iranian flutter developer
Always remember that you should have a good vpn
You can try proton vpn/Windscribe
After turning your vpn on try:
flutter clean
flutter pub get
You have to add the package in pubspec.yaml file and press on pub-get to download and configure the package with your project.
But first of all, if you don't have the google services at your country, you have to connect via VPN to be able to work.