由于上述问题,无法构建flutter插件url_launcher_macos

时间:2019-12-11 17:31:11

标签: flutter

当我尝试build apk或在发布模式下运行应用程序时,出现此错误,而我无法解决

The plugin url_launcher_macos could not be built due to the issue above.

我已安装的插件,并且出现错误:

url_launcher: ^5.4.0
url_launcher_macos: ^0.0.1

错误:

[        ] Building plugin url_launcher...
[   +2 ms] Running Gradle task 'assembleAarRelease'...
[   +1 ms] gradle.properties already sets `android.enableR8`
[   +3 ms] Using gradle from C:\\Users\\mahdi\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\url_launcher-5.4.0\\android\gradlew.bat.
[   +1 ms] executing: [C:\\Users\\mahdi\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\url_launcher-5.4.0\\android\]
C:\\Users\\mahdi\\AppData\\Roaming\\Pub\\Cache\\hosted\\pub.dartlang.org\\url_launcher-5.4.0\\android\gradlew.bat -I=C:\flutter\packages\flutter_tools\gradle\aar_init_script.gradle
-Pflutter-root=C:\flutter -Poutput-dir=G:\Projects\Flutter\unlimited_power_pro\build\app -Pis-plugin=true -Ptarget-platform=android-arm,android-arm64,android-x64 assembleAarRelease
[+4967 ms] > Task :assembleAarRelease UP-TO-DATE
           > Task :preBuild UP-TO-DATE
           > Task :preReleaseBuild UP-TO-DATE
           > Task :compileReleaseAidl NO-SOURCE
           > Task :compileReleaseRenderscript NO-SOURCE
           > Task :checkReleaseManifest UP-TO-DATE
           > Task :generateReleaseBuildConfig UP-TO-DATE
           > Task :generateReleaseResValues UP-TO-DATE
           > Task :generateReleaseResources UP-TO-DATE
           > Task :packageReleaseResources UP-TO-DATE
           > Task :processReleaseManifest UP-TO-DATE
           > Task :generateReleaseRFile UP-TO-DATE
           > Task :prepareLintJar UP-TO-DATE
           > Task :generateReleaseSources UP-TO-DATE
           > Task :javaPreCompileRelease UP-TO-DATE
           > Task :compileReleaseJavaWithJavac UP-TO-DATE
           > Task :extractReleaseAnnotations UP-TO-DATE
           > Task :mergeReleaseConsumerProguardFiles UP-TO-DATE
           > Task :mergeReleaseShaders UP-TO-DATE
           > Task :compileReleaseShaders UP-TO-DATE
           > Task :generateReleaseAssets UP-TO-DATE
           > Task :packageReleaseAssets UP-TO-DATE
           > Task :packageReleaseRenderscript NO-SOURCE
           > Task :prepareLintJarForPublish UP-TO-DATE
           > Task :processReleaseJavaRes NO-SOURCE
           > Task :transformResourcesWithMergeJavaResForRelease UP-TO-DATE
           > Task :transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
           > Task :mergeReleaseJniLibFolders UP-TO-DATE
           > Task :transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
           > Task :transformNativeLibsWithStripDebugSymbolForRelease UP-TO-DATE
           > Task :transformNativeLibsWithSyncJniLibsForRelease UP-TO-DATE
           > Task :bundleReleaseAar UP-TO-DATE
           > Task :uploadArchives

           BUILD SUCCESSFUL in 4s
           23 actionable tasks: 1 executed, 22 up-to-date
[   +1 ms] Running Gradle task 'assembleAarRelease'... (completed in 5.0s)
[        ] √ Built build\app\outputs\repo.
[        ] Building plugin url_launcher_macos...
[   +1 ms] Running Gradle task 'assembleAarRelease'...
[   +7 ms] "flutter apk" took 145,068ms.
The plugin url_launcher_macos could not be built due to the issue above.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      buildPluginsAsAar (package:flutter_tools/src/android/gradle.dart:726:7)
<asynchronous suspension>
#2      buildGradleApp (package:flutter_tools/src/android/gradle.dart:257:11)
#3      buildGradleApp (package:flutter_tools/src/android/gradle.dart:415:19)
<asynchronous suspension>
#4      _AndroidBuilderImpl.buildApk (package:flutter_tools/src/android/android_builder.dart:97:13)
#5      BuildApkCommand.runCommand (package:flutter_tools/src/commands/build_apk.dart:106:26)
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:615:18)
<asynchronous suspension>
#7      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:515:33)
<asynchronous suspension>
#8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#9      _rootRun (dart:async/zone.dart:1126:13)
#10     _CustomZone.run (dart:async/zone.dart:1023:19)
#11     _runZoned (dart:async/zone.dart:1518:10)
#12     runZoned (dart:async/zone.dart:1465:12)
#13     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#14     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
#15     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#16     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)
<asynchronous suspension>
#17     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#18     _rootRun (dart:async/zone.dart:1126:13)
#19     _CustomZone.run (dart:async/zone.dart:1023:19)
#20     _runZoned (dart:async/zone.dart:1518:10)
#21     runZoned (dart:async/zone.dart:1465:12)
#22     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#23     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
#24     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#25     new Future.sync (dart:async/future.dart:224:31)
#26     CommandRunner.run (package:args/command_runner.dart:112:14)
#27     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
#28     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
#29     _rootRun (dart:async/zone.dart:1126:13)
#30     _CustomZone.run (dart:async/zone.dart:1023:19)
#31     _runZoned (dart:async/zone.dart:1518:10)
#32     runZoned (dart:async/zone.dart:1502:12)
#33     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#34     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#35     _rootRun (dart:async/zone.dart:1126:13)
#36     _CustomZone.run (dart:async/zone.dart:1023:19)
#37     _runZoned (dart:async/zone.dart:1518:10)
#38     runZoned (dart:async/zone.dart:1465:12)
#39     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#40     runInContext (package:flutter_tools/src/context_runner.dart:64:24)
#41     run (package:flutter_tools/runner.dart:50:10)
#42     main (package:flutter_tools/executable.dart:65:9)
#43     main (file:///C:/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#44     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32)
#45     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)

1 个答案:

答案 0 :(得分:1)

此命令解决了我的问题:

thumbnail