# App打包

flutter build apk

打包路径: build\app\outputs\apk\release\app-release.apk

然后进入到打包路径, 执行

adb install app-release.apk

# 应用打包后不能进行网络请求

在以下两个文件中加入:

  • android\app\src\profile\AndroidManifest.xml
  • android/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

参考:

MIT Licensed | Copyright © 2018-present 滇ICP备16006294号

Design by Quanzaiyu | Power by VuePress