Flutter应用在APK文件中没有互联网许可 [英] Flutter app doesn't have internet permission in APK file

查看:116
本文介绍了Flutter应用在APK文件中没有互联网许可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

扑朔迷离的我的APK构建文件没有互联网许可。
我已经这样做了

My APK build file in flutter doesn't have internet permission. I already did this

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.Supplier_app">
    <!-- Flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET" />
</manifest>


推荐答案

这是初学者所面临的非常普遍的问题。

This is a very general issue faced by flutter beginners.

在android中,每个必需的权限都在 AndroidManifest.xml 文件中指定。

In android, each required permission is specified in AndroidManifest.xml file.

在本机编码中, app / src / main 中只有一个文件。对于颤振,不是一个而是三个。

For native coding there is only one file inside app/src/main. For flutter, there are not one but 3 of these.


  1. app / src / debug / AndroidManifest.xml -用于调试模式

  2. app / src / main / AndroidManifest.xml -用于发布模式下的应用分发

  3. app / src / profile / AndroidManifest.xml -用于在配置文件模式下运行应用程序

  1. app/src/debug/AndroidManifest.xml - for debug mode
  2. app/src/main/AndroidManifest.xml- for app distribution in release mode
  3. app/src/profile/AndroidManifest.xml - for running app in profile mode

默认情况下,在调试模式下提供Internet权限。因此,Internet无需执行任何操作即可。

The internet permission is provided by default in the debug mode. So, internet works without doing anything.

必须在 app / src / main / AndroidManifest中指定应用分发所需的所有权限.xml 出于测试目的,在提到的其他文件中指定了权限。

这篇关于Flutter应用在APK文件中没有互联网许可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆