ro.product.cpu.abi

时间:2019-01-23 04:57:34

标签: android flutter unhandled-exception

我是扑朔迷离的新手,已经成功安装它并在一台机器上工作,但是在这台机器上工作时,我遇到了一些问题。这是android studio,flutter和gradle的全新安装。机器正在运行更新的Windows 10。

Flutter医生语句在检索设备属性时返回错误。

C:\Development\FlutterApps\first_app>flutter doctor -v
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.523], locale en-US)
    • Flutter version 1.0.0 at C:\Development\Flutter
    • Framework revision 5391447fae (8 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

\Error retrieving device properties for ro.product.cpu.abi:
                                                                                                                                                                                       [
√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Development\Android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:\Development\Android
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 31.3.3
    • Dart plugin version 182.5124
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-arm • Android null (API null)

• No issues found!

尝试在模拟的android实例或真实设备上运行flutter应用程序时,出现相同的错误:

Error retrieving device properties for ro.product.cpu.abi:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
--------- beginning of system
01-22 22:51:04.010 E/BatteryStatsService( 1698): modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
Unhandled exception:
Exit code -1073740940 from: C:/Development/Android\platform-tools\adb -s emulator-5554 shell -x logcat -v time -t 1
#0      _runWithLoggingSync (package:flutter_tools/src/base/process.dart:353:7)
#1      runCheckedSync (package:flutter_tools/src/base/process.dart:284:10)
#2      AndroidDevice.lastLogcatTimestamp (package:flutter_tools/src/android/android_device.dart:504:27)
#3      _AdbLogReader._start (package:flutter_tools/src/android/android_device.dart:678:41)
#4      _runGuarded (dart:async/stream_controller.dart:804:24)
#5      _BroadcastStreamController._subscribe (dart:async/broadcast_stream_controller.dart:217:7)
#6      _ControllerStream._createSubscription (dart:async/stream_controller.dart:817:19)
#7      _StreamImpl.listen (dart:async/stream_impl.dart:472:9)
#8      FlutterDevice.startEchoingDeviceLog (package:flutter_tools/src/resident_runner.dart:242:71)
#9      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:285:5)
<asynchronous suspension>
#10     HotRunner.run (package:flutter_tools/src/run_hot.dart:272:39)
<asynchronous suspension>
#11     AppDomain.startApp.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:387:62)
#12     AppDomain.launch.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:438:26)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#14     _rootRun (dart:async/zone.dart:1124:13)
#15     _CustomZone.run (dart:async/zone.dart:1021:19)
#16     _runZoned (dart:async/zone.dart:1516:10)
#17     runZoned (dart:async/zone.dart:1463:12)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#19     AppInstance._runInZone (package:flutter_tools/src/commands/daemon.dart:820:20)
#20     AppDomain.launch (package:flutter_tools/src/commands/daemon.dart:436:15)
<asynchronous suspension>
#21     AppDomain.startApp (package:flutter_tools/src/commands/daemon.dart:384:12)
<asynchronous suspension>
#22     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:289:38)
<asynchronous suspension>
#23     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:401:18)
#24     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#25     _rootRunUnary (dart:async/zone.dart:1132:38)
#26     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#27     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#28     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#29     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#30     Future._complete (dart:async/future_impl.dart:476:7)
#31     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#32     _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
#33     _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:295:13)
#34     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#35     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#36     _rootRunUnary (dart:async/zone.dart:1132:38)
#37     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#38     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#39     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#40     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#41     Future._complete (dart:async/future_impl.dart:476:7)
#42     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#43     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#44     _rootRun (dart:async/zone.dart:1124:13)
#45     _CustomZone.run (dart:async/zone.dart:1021:19)
#46     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#47     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#48     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#49     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#50     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

10 个答案:

答案 0 :(得分:3)

另一个可能的错误是,对于物理设备,您需要启用文件传输模式(不收费)以及调试功能

答案 1 :(得分:2)

尝试重新启动adb,这是已知的issue with the adb daemon service and flutter which you can see on github。它必须在android端修复,可悲的是在不久的将来没有分辨率。

在Windows上,在管理模式下命令提示符/ powershell

adb kill-server

然后

adb start-server

如果adb不在命令行路径中,则需要添加它或导航到Windows中的adb.exe位置,然后从该路径运行命令行/ powershell。

答案 2 :(得分:2)

我遇到了同样的问题。我通过更改 USB 首选项解决了它。 将 USB 首选项从充电更改为文件传输对我有用。

答案 3 :(得分:1)

因此,在努力使程序正常运行并进行了更多搜索之后,我找到了解决我遇到的两个问题的解决方案。

第一个问题是,除非studio.bat正在运行,否则android studio不会运行,这是通过在Windows安全设置中禁用ASLR来解决的。 (studio.exe / studio64.exe)

第二个问题是它无法检索设备属性,这是通过在adb上禁用堆保护而解决的。 (adb.exe)

发布有关如何操作的更多详细信息: https://stackoverflow.com/a/54164463/4125133

答案 4 :(得分:1)

此链接https://github.com/flutter/flutter/issues/33938#issuecomment-499250288中有一个临时修复程序。它对我有用。

P.D。也许您需要在Android Studio中将API 29降级为API 28。

答案 5 :(得分:0)

答案 6 :(得分:0)

在flutter文件夹上的cmd: _git拉 _flutter频道主 _和扑医生

这解决了我所有的问题!

答案 7 :(得分:0)

到目前为止,我能够解决此问题的唯一方法是降级为 http://dl-ssl.google.com/android/repository/platform-tools_r28.0.2-windows.zip

中的 Android平台工具28

使用.zip完全替换位于

platform-tools 文件夹的内容

C:\ Users \ [我的用户名] \ AppData \ Local \ Android \ Sdk \

(请注意, AppData 子文件夹已隐藏)。

此后,Flutter Doctor没发现任何问题,因此我能够在Android设备上部署该应用程序。

参考https://github.com/flutter/flutter/issues/33938

??

答案 8 :(得分:0)

我也有问题,我重新安装了孔系统,但问题仍然如此,要按照以下步骤解决问题

  1. Windows:http://dl-ssl.google.com/android/repository/platform-tools_r28.0.2-windows.zip macOS:http://dl-ssl.google.com/android/repository/platform-tools_r28.0.2-darwin.zip Linux:http://dl-ssl.google.com/android/repository/platform-tools_r28.0.2-linux.zip
  2. 以sdk路径下载过去并替换为平台工具后
  3. 重新启动计算机
  4. 重新启动后,您打开Android Studio后,平台工具没有更新 忽略,然后运行您完成的应用?

答案 9 :(得分:0)

我通过安装 Android SDK平台工具解决了此问题。

打开Android Studio->配置(右下)-> SDK管理器-> SDK工具(第二次点击)

enter image description here