如何解决Android Studio 模拟器无法运行
我在 Android 模拟器中遇到了问题。 我制作了很多模拟器,并用它们运行了 flutter 应用程序。 但是我的模拟器不会因任何错误而关闭,并且无法正常工作。 当我按下运行按钮时 它调试了很长时间,但不起作用。
我只能看到模拟器的背景。
我认为 logcat 会有所帮助,但红色字母并没有太大帮助。
2021-03-12 17:59:20.409 481-481/? E/netmgr: qemu_pipe_open_ns:62: Could not connect to the 'pipe:qemud:network' service: Invalid argument
2021-03-12 17:59:20.410 481-481/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2021-03-12 17:59:20.416 483-483/? E/wifi_forwarder: qemu_pipe_open_ns:62: Could not connect to the 'pipe:qemud:wififorward' service: Invalid argument
2021-03-12 17:59:20.416 483-483/? E/wifi_forwarder: RemoteConnection failed to initialize: RemoteConnection failed to open pipe
2021-03-12 17:59:24.981 217-221/? E/android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup34: Permission denied
2021-03-12 17:59:24.983 217-221/? E/android.system.suspend@1.0-service: Error opening kernel wakelock stats for: wakeup35: Permission denied
当然,我试过 adb kill。
所以我需要帮助。
解决方法
添加android:networkSecurityConfig="@xml/network_security_config"
到 android/app/src 路径中的 AndroidManifest.xml,在 <aplication
标签内
然后在android/app/src/xml路径下创建network_security_config.xml
了解更多信息:https://developer.android.com/training/articles/security-config
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。