简体   繁体   中英

Flutter Location Package is Not Working in App Release Mode

Flutter App is working fine with Location Package in Debug Mode but it is not working in Release Mode, the app is not giving location access. i tried to use Flutter Clean Command but nothing Helped. Pls Help me

If your problem is that the flutter build (APK, bundle) isn't making API calls in a real device, this is because you need to add the Internet permission to Android Manifest before creating the release/build.

By default, "internet use" will work fine on the emulator but not on a real device.

To fix this, simply:

Open the file "android/app/src/main/AndroidManifest.xml" and add the proper user-permission

<manifest> 
...
 <uses-permission android:name="android.permission.INTERNET"/>
...
</manifest>

And then create your build again. Also there is discussion on github, you can visit their and clearify your problem more effectively Github .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM