android 错误:../../运行时/虚拟机/zone.cc:96:错误:内存不足抖动和VisualStudio

gojuced7  于 2023-02-17  发布在  Android
关注(0)|答案(1)|浏览(421)

当我尝试在VisualStudio上运行flutter项目时,出现以下错误:

v
ersion=2.18.6 (stable) (Tue Dec 13 21:15:14 2022 +0000) on "windows_x64"
pid=21740, thread=9520, isolate_group=main(000002143A8F4EA0), isolate=(nil)(0000000000000000)
isolate_instructions=21439460000, vm_instructions=7ff7622366e0

 pc 0x00007ff762440202 fp 0x000000f7da1fdb10 Dart_IsPrecompiledRuntime+0x21ef62
-- End of DumpStackTrace
../../runtime/vm/zone.cc: 96: error: Out of memory.
Aborting re-entrant request for stack trace.

../../runtime/vm/zone.cc: 96: error: Out of memory.
version=2.18.6 (stable) (Tue Dec 13 21:15:14 2022 +0000) on "windows_x64"
pid=4772, thread=5316, isolate_group=main(000002AD3588A0C0), isolate=(nil)(0000000000000000)
isolate_instructions=7ff7622366d0, vm_instructions=7ff7622366e0
  pc 0x00007ff762440202 fp 0x000000da680fdff0 Dart_IsPrecompiledRuntime+0x21ef62
-- End of DumpStackTrace
=== Crash occured when compiling dart:core_RegExp__matcher in optimizing JIT mode in TypePropagation pass
../../runtime/vm/zone.cc: 96: error: Out of memory.
Aborting re-entrant request for stack trace.

我没有使用模拟器,这是AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.mypocket">
    <!-- The INTERNET permission is required for development. Specifically,
         the Flutter tool needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <application android:allowBackup="false"></application>
</manifest>

请帮帮忙,我不知道该怎么办!

nwlqm0z1

nwlqm0z11#

请将activity类添加到manifest文件中

<activity
            android:name=".MainActivity"
            android:allowBackup="false"
            android:exported="true"
            android:fullBackupOnly="false" //add this line
            android:hardwareAccelerated="true" // add this line
            android:launchMode="singleTop"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.AppCompat.Light"
            android:windowSoftInputMode="adjustResize">

相关问题