Flutter:在模拟器上运行而不在真实设备上运行

时间:2019-06-06 11:30:49

标签: flutter dart

我正在使用flutter,并且代码在模拟器上运行,但不在我的真实设备上运行

颤抖的医生-v返回:

[√] Flutter (Channel dev, v1.7.1, on Microsoft Windows [Version 10.0.17134.765], locale en-IN)
    • Flutter version 1.7.1 at D:\Dart\flutter
    • Framework revision 04015b987b (2 days ago), 2019-06-04 07:01:52 -0700
    • Engine revision a63ef4cb4f
    • Dart version 2.3.2 (build 2.3.2-dev.0.0 b080e7c97a)


[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\Orion Edutech\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-Q, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 34.0.2
    • Dart plugin version 183.5901
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] VS Code (version 1.35.0)
    • VS Code at C:\Users\Orion Edutech\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.1.0

[√] Connected device (2 available)
    • Pixel XL                  • LC49XYE45064  • android-arm • Android 6.0.1 (API 23)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!

有时在安装时会显示错误消息:

error connecting to the service protocol httpexception uri http...

有时是这样:

06-06 16:47:59.667 21972-22004/com.example.sample A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x207232c in tid 22004 (1.ui)
06-06 16:48:00.115 239-239/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-06 16:48:00.115 239-239/? A/DEBUG: CM Version: 'ResurrectionRemix-M-v5.7.1-20160714-mt6582-mtkroms.com'
06-06 16:48:00.115 239-239/? A/DEBUG: Build fingerprint: 'mediatek/cm_mt6582/mt6582:6.0.1/MOB30R/55e82e3694:userdebug/test-keys'
06-06 16:48:00.115 239-239/? A/DEBUG: Revision: '0'
06-06 16:48:00.115 239-239/? A/DEBUG: ABI: 'arm'
06-06 16:48:00.115 239-239/? A/DEBUG: pid: 21972, tid: 22004, name: 1.ui  >>> com.example.sample <<<
06-06 16:48:00.115 239-239/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x207232c
06-06 16:48:00.406 239-239/? A/DEBUG:     r0 a043f628  r1 9ff74d8c  r2 9ff753dc  r3 00000010
06-06 16:48:00.406 239-239/? A/DEBUG:     r4 72616578  r5 02071800  r6 00000b28  r7 02072328
06-06 16:48:00.406 239-239/? A/DEBUG:     r8 55555555  r9 33333333  sl 01010101  fp fffffff8
06-06 16:48:00.406 239-239/? A/DEBUG:     ip 00001ff8  sp 9baff7fc  lr ffffffff  pc a2d90a5e  cpsr 000d0030
06-06 16:48:00.419 239-239/? A/DEBUG: backtrace:
06-06 16:48:00.419 239-239/? A/DEBUG:     #00 pc 00f8da5e  /data/app/com.example.sample-1/lib/arm/libflutter.so (offset 0xafa000)
06-06 16:48:00.419 239-239/? A/DEBUG:     #01 pc 00f8d835  /data/app/com.example.sample-1/lib/arm/libflutter.so (offset 0xafa000)
06-06 16:48:00.419 239-239/? A/DEBUG:     #02 pc 00f8d413  /data/app/com.example.sample-1/lib/arm/libflutter.so (offset 0xafa000)
06-06 16:48:00.419 239-239/? A/DEBUG:     #03 pc 00ead437  /data/app/com.example.sample-1/lib/arm/libflutter.so (offset 0xafa000)
06-06 16:48:00.419 239-239/? A/DEBUG:     #04 pc 00ead357  /data/app/com.example.sample-1/lib/arm/libflutter.so (offset 0xafa000)
06-06 16:48:00.419 239-239/? A/DEBUG:     #05 pc 00e4b335  /data/app/com.example.sample-1/lib/arm/libflutter.so (offset 0xafa000)
06-06 16:48:00.419 239-239/? A/DEBUG:     #06 pc 0003fa2b  /system/lib/libc.so (_ZL15__pthread_startPv+30)
06-06 16:48:00.419 239-239/? A/DEBUG:     #07 pc 0001a065  /system/lib/libc.so (__start_thread+6)
06-06 16:48:01.048 239-239/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_07
06-06 16:48:01.048 239-239/? E/DEBUG: AM write failed: Broken pipe

我已经在Visual Studio Code和Android Studio中运行了该代码,但是该代码从未在真实设备上运行,而是始终在模拟器上运行。 我只是试图运行默认代码来计算按钮的按下次数。我如何使其工作

0 个答案:

没有答案