Flutter: Real ads doesn't work on release mode - flutter

I have added my device id to admob console as test device.
When I build apk and install it on my test device, the ads work fine, But on other devices not.
I have searched a lot but there is no answer.
I used:
native_admob_flutter: ^1.5.0
Flutter doctor:
[√] Flutter (Channel stable, 2.5.2, on Microsoft Windows [Version 10.0.19044.1348], locale en-US)
• Flutter version 2.5.2 at C:\Src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (3 months ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
How can I know if this happen because of console or my flutter code?

Its not from your code its from your Ads serving company or Admob.
You have to add the other device as a test device otherwise you need to make your App reviewed if not it will rarely shows ads.

Related

Xcodebuild fail flutter

I am new to flutter and Xcode, I got a new MacBook pro m1 max and I have a problem with my Xcode build when I try to launch my flutter application, flutter doctor gives me this error:
[!] Flutter (Channel stable, 3.3.8, on macOS 13.0.1 22A400 darwin-arm, locale en-FR)
• Flutter version 3.3.8 on channel stable at /Users/rixez/Developers/medissimo/mobil/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 52b3dc25f6 (8 days ago), 2022-11-09 12:09:26 +0800
• Engine revision 857bd6b74c
• Dart version 2.18.4
• DevTools version 2.15.0
✗ Downloaded executables cannot execute on host.
See https://github.com/flutter/flutter/issues/6207 for more information
and when I try to launch the application here is the message.
2022-11-17 10:24:39.622 xcodebuild[5938:33408] apply_selection_policy_once: avoid use of removable GPUs (via com.apple.dt.xcodebuild:GPUSelectionPolicy->avoidRemovable)
Do you have an idea to get rid of this problem?
I tried to change the GPUSelectionPolicy->avoidRemovable but it didn't change anything
Please try installing Rosetta as described here:
https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon

Flutter doctor - Windows Version (Unable to confirm if installed Windows version is 10 or greater)

I just updated my Flutter form 3.5.0-12.0.pre.168 to 3.6.0-1.0.pre.35 on the master channel.
Im on the master channel because on the stable channel I have troubles with keyboard inputs. But that shouldn't have to do anything with this "problem". Actually is it not a real problem, because everything is still working.
Only the Flutter doctor has a new check that I didn't had before or didn't notice.
It's checking now the Windows Version. But on my computer it is't able to check it.
I can't figure out why. Any suggestions?
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 3.6.0-1.0.pre.35, on Microsoft Windows [Version 10.0.19044.2251], locale de-DE)
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.6)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.71.2)
[√] Connected device (3 available)
[√] HTTP Host Availability
! Doctor found issues in 1 category.
_
flutter --version
Flutter 3.6.0-1.0.pre.35 • channel master • https://github.com/flutter/flutter.git
Framework • revision c021d9177c (56 minutes ago) • 2022-11-10 23:36:02 -0800
Engine • revision 19ead2834a
Tools • Dart 2.19.0 (build 2.19.0-388.0.dev) • DevTools 2.19.0
Write in your windows prompt o Powershell:
C:\>flutter upgrade
C:\>flutter channel master
C:\>flutter doctor -v
It was an operation language problem. On English Windows versions the issue didn't appeared. But on almost every other language (in my case German) it appeared.
It got solved for the master channel.
https://github.com/flutter/flutter/issues/117890
I removed flutter SDK and installed latest SDK then this problem was solved.
Don't forget to set the path of environment.
Deleting SDK took so much times... If you couldn't remove it, just reboot PC.

How can I run flutter unit test in the browser?

The command flutter test -p chrome /path/to/my/test/file.dart unable to work. What parameters should I use?
[√] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.17763.1817], locale zh-CN)
• Flutter version 2.0.3 at D:\SDK\Flutter
• Framework revision 4d7946a68d (13 days ago), 2021-03-18 17:24:33 -0700
• Engine revision 3459eb2436
• Dart version 2.12.2
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
Being a unit test you should not specify any platform. So the command should only be flutter test /path/to/my/test/file.dart
You only need to run on a specific platform in cases of integration tests.
If u using VScode Follow this steps
1.Step 1 area click anf then
2.Step 2 area Whatever device you want to choose
[][]

Flutter 1.12 app crashes on iPhone 4S (iOS 9.3.6) device

I have an app that recently I have updated to Flutter 1.12. Once I have pushed the release to Apple Store, I have reported a crash from one of my users - they have an iPhone 4S (iOS 9.3.6) device.
Prior that when my app was built with Flutter v1.9.1+hotfix.6 I have no such issues.
Here is my flutter doctor -v output:
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.14.6
18G1012,
locale en-GB)
• Flutter version 1.12.13+hotfix.8 at /Users/angel/development/flutter
• Framework revision 0b8abb4724 (6 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/setup/#android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.8.4
[!] Android Studio (not installed)
• Android Studio not found; download from
https://developer.android.com/studio/index.html
(or visit https://flutter.dev/setup/#android-setup for detailed
instructions).
[✓] VS Code (version 1.43.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.8.1
I realize the feedback I am giving you guys is limited, however, since I have no such hardware in the possession and in general I have no much of experience with iOS devices, I would appreciate any advice how to proceed on this topic.
Thanks!

"flutter web is currently not supported"

I'm making a website in flutter web
When I use the command
webdev serve
Everything works, but when I use the command
flutter build web
I get this error:
Downloading Web SDK... 1,6s
"build web" is not currently supported.
This is my flutter version
[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.15 xxxx, locale xxx)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.40.0)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
Thanks in advance!
I also faced the same issue.
Follow the official documentation
In my case, I missed to execute the following command
> flutter config --enable-web
Also, ensure that you are in the 'Dev' channel
flutter channel dev
Flutter 1.9 has early support for web application and the message seems to say you're not using a channel which has the web development
Did you change the channel to be able to build your web application: flutter channel dev, upgrade flutter, enable web in the configuration?
I don't use webdev serve but flutter run -d chrome
When running flutter doctor -v, you should have something like:
[✓] Flutter (Channel master, v1.10.15-pre.272, on Mac OS X 10.13.4 17E199, locale fr-FR)
• Flutter version 1.10.15-pre.272 at /Users/erictaix/development/tools/flutter
• Framework revision 5bc7fb6835 (13 days ago), 2019-10-27 21:25:13 -0700
• Engine revision 3ebf006904
• Dart version 2.6.0 (build 2.6.0-dev.8.2 6354b0b97d)
...
[✓] Connected device (3 available)
• macOS • macOS • darwin-x64 • Mac OS X 10.13.4 17E199
• Chrome • chrome • web-javascript • Google Chrome 78.0.3904.97
• Web Server • web-server • web-javascript • Flutter Tools
Note that flutter use master channel on my computer (dev should work) and in connected devices, you can see Chrome and Web Server.
My version is 1.10 because as mentioned, I use the channel master which is not stable at all. But with dev channel it should work. Please refer to the documentation for up-to-date instructions: https://flutter.dev/docs/get-started/web