Url not resolve on release apk but resovle on debug - flutter

My app have to reach a rocket.chat server. When I use VSCode in debug mode is working.
But when I build the app publish in beta version and I test it on the same phone I have the error
SocketException: Failed host lookup: 'xxx.xxxx.xxx' (OS Error: No address associated with hostname, errno = 7)
I checked the AndroidManifest.xml and I have
<uses-permission android:name="android.permission.INTERNET"/>
I cannot understand why is working on debug but not on release.

I found the solution.
There are multiple AndroidManifest.xml
This file is use to build release app and I doesn't have the Internet permission
android/app/src/main/AndroidManifest.xml

Related

Flutter app keep sending me this on log when restart 'Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.'

i keep getting this error in my app when i debug my app, the error say
W/DynamiteModule( 6570): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
I/DynamiteModule( 6570): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 6570): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
whenever i restart my flutter app. it keep giving me this error, and when i tried to take data from firestore it didn't gave me any. after i go to other page and go back to the original page. the data load and the error gone.
i've been following some of other relate question and there's no helpful answer for that, this what i've been tried earlier
adding <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> to the AndroidManifest.xml at android > App > main > AndroidManifest.xml
tried to do flutter clean and flutter pub get and still didn't solve the problem.
adding this <uses-permission android:name="android.permission.INTERNET"/> to the AndroidManifest.xml and remove it again and still not solve the problem.
i've been check the pubspec.yaml and do dependencies update and still yet there's no sign of the problem been solve.
debug on emulator, and 2 real device still gave me the same problem.
tried to delete the app on device and built it again, and nope
multiDexEnabled true added to app/build.gradle
yep and the issue still there. and the problem only show up when being first open/run. and after i goes to other, it'll comeback to normal.

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" />

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.

How to enable Flutter internet permission for macos desktop app?

I am trying to develop Flutter app which will run also on destkop.
This app is using http package:
import 'package:http/http.dart'
When I am trying to perform http request I am getting this exception:
SocketException: Connection failed (OS Error: Operation not permitted, errno = 1), address = firebasedynamiclinks.googleapis.com, port = 443
This app is working on Android and iOS, how to enable this permission for macos?
I am using IntelliJ IDE, so this answer is not satisfying me Flutter - http.get fails on macos build target: Connection failed
You need to add:
<key>com.apple.security.network.client</key>
<true/>
to macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements.
This is documented here.
you should give "Outgoing Connections (Client)" permission to your project through Xcode. for a complete explanation check this link.

Problem after generating released apk file in flutter

I generated the released apk file in flutter using android studio. But after generating the file it was installed in real time mobile but not working. It shows host name error in the console. How to resolve this error?
Make sure you added
< uses-permission android:name="android.permission.INTERNET"/>
to your Manifest.xml file android/app/src/main, because flutter do this only for development version
under