flutter Android Studio:检索ro.product.cpu.abi的设备属性时出错:

时间:2019-06-05 19:40:13

标签: android-studio flutter

当我尝试在Android Studio中的模拟器中运行我的应用程序时,出现以下错误。我必须说,它在将SDK更新到v.29之前可以正常工作,而在停止之后却无法工作。我现在有什么需要改变的吗?

到目前为止,我试图杀死并重新启动adb服务器并禁用堆保护。

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 main
06-05 21:14:13.850 I/GnssLocationProvider( 1898): WakeLock released by handleMessage(REPORT_SV_STATUS, 0, com.android.server.location.GnssLocationProvider$SvStatusInfo@29d78c9)
Unhandled exception:
Exit code -1073740940 from: C:\Users\Viktor\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
#0      _runWithLoggingSync (package:flutter_tools/src/base/process.dart:360:7)
#1      runCheckedSync (package:flutter_tools/src/base/process.dart:289:10)
#2      AndroidDevice.lastLogcatTimestamp (package:flutter_tools/src/android/android_device.dart:513:27)
#3      _AdbLogReader._start (package:flutter_tools/src/android/android_device.dart:688:41)
#4      _runGuarded (dart:async/stream_controller.dart:805:24)
#5      _BroadcastStreamController._subscribe (dart:async/broadcast_stream_controller.dart:213:7)
#6      _ControllerStream._createSubscription (dart:async/stream_controller.dart:818:19)
#7      _StreamImpl.listen (dart:async/stream_impl.dart:472:9)
#8      FlutterDevice.startEchoingDeviceLog (package:flutter_tools/src/resident_runner.dart:318:71)
#9      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:361:5)
<asynchronous suspension>
#10     HotRunner.run (package:flutter_tools/src/run_hot.dart:253:39)
<asynchronous suspension>
#11     AppDomain.startApp.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:389:23)
#12     AppDomain.launch.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:449: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:819:20)
#20     AppDomain.launch (package:flutter_tools/src/commands/daemon.dart:447:15)
<asynchronous suspension>
#21     AppDomain.startApp (package:flutter_tools/src/commands/daemon.dart:383:12)
<asynchronous suspension>
#22     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:301:38)
<asynchronous suspension>
#23     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:559:18)
#24     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_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:126:18)
#28     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#29     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#30     Future._complete (dart:async/future_impl.dart:473:7)
#31     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#32     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)
#33     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
#34     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#35     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_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:126:18)
#39     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#40     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#41     Future._complete (dart:async/future_impl.dart:473:7)
#42     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#43     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_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-patch/isolate_patch.dart:115:13)
#50     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

这是SDK工具的图片。也许很重要... sdk version

1 个答案:

答案 0 :(得分:6)

这似乎是平台工具版本28的更新问题,具体来说是ADB工具。有一个临时修复程序,因此您可以按照此链接https://github.com/flutter/flutter/issues/33938#issuecomment-499250288

中提供的步骤进行操作

PD。如果您已经安装了API 29版本,则可能需要降级。 v.29-> v.28