Unable to open xmltree error in flutter when i try to run fresh sample app Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Unable to open xmltree error in flutter when i try to run fresh sample app without wasting too much if your time.

The question is published on by Tutorial Guruji team.

Whenever i try to run flutter app from vscode i get the error

W/ziparchive( 6116): Unable to open 'xmltree': No such file or directory
xmltree: error:failed to open file: The system cannot find the file specified. (2).

The same app run from the android studio. Also after installation i get the issue when i run command flutter doctor. Error sail aapt file not found in sdk so i copy the aapt2 file in the same folder and rename it with aapt.

Below i share the log file created when i run command flutter run

Flutter crash report; please file at https://github.com/flutter/flutter/issues.


flutter run

String: Exit code 1 from:  

C:UsersadminAppDataLocalAndroidSdkbuild-tools28.0.3aapt dump xmltree E:Flutter Appfirst_appbuildappoutputsapkapp.apk AndroidManifest.xml

#0      _runWithLoggingSync (package:flutter_tools/src/base/process.dart:360:7)
#1      runCheckedSync (package:flutter_tools/src/base/process.dart:289:10)
#2      new AndroidApk.fromApk (package:flutter_tools/src/application_package.dart:120:27)
#3      AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart:158:27)
<asynchronous suspension>
#4      ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart:46:32)
<asynchronous suspension>
#5      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:345:56)
<asynchronous suspension>
#6      HotRunner.run (package:flutter_tools/src/run_hot.dart:253:39)
<asynchronous suspension>
#7      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:428:     
<asynchronous suspension>
#8      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:559:18)
#9      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#10     _rootRunUnary (dart:async/zone.dart:1132:38)
#11     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#12     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#13     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#14     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#15     Future._complete (dart:async/future_impl.dart:473:7)
#16     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#17     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)
#18     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
#19     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#20     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#21     _rootRunUnary (dart:async/zone.dart:1132:38)
#22     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#23     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#24     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#25     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#26     Future._complete (dart:async/future_impl.dart:473:7)
#27     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#28     _AsyncAwaitCompleter.complete. 
<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#29     _rootRun (dart:async/zone.dart:1124:13)
#30     _CustomZone.run (dart:async/zone.dart:1021:19)
#31     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#32     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#33     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#34     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#35     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

flutter doctor:

[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.10240], locale en-IN)
• Flutter version 1.5.4-hotfix.2 at D:Flutter SDKflutter
• Framework revision 7a4c33425d (8 weeks ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:UsersadminAppDataLocalAndroidSdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = C:UsersadminAppDataLocalAndroidSdk
• Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
• 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 FilesAndroidAndroid Studio
• Flutter plugin version 36.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.35.1)
• VS Code at C:UsersadminAppDataLocalProgramsMicrosoft VS Code
• Flutter extension version 3.1.0

[✓] Connected device (1 available)
• Redmi Y1 • 8c9968db • android-arm64 • Android 7.1.2 (API 25)

• No issues found!

I am using real device to test.


Thank you @BarryWang for your help. I solved this issue by upgrading my Android SDk version from 28 API to 29.

We are here to answer your question about Unable to open xmltree error in flutter when i try to run fresh sample app - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji