当我将gradle依赖项添加到Google跟踪代码管理器时,应用无法启动。它与assembleDebug有关。当我删除此依赖项时,应用程序可以正常运行。
我尝试了另一个版本的标签管理器Dependecny,但仍然无法正常工作。
我的gradle依赖项
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.facebook.android:facebook-login:[5,6)'
implementation 'com.google.android.gms:play-services-tagmanager:11.0.4'
}
apply plugin: 'com.google.gms.google-services'
这是Flutter Doctor -v的输出
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Linux, locale cs_CZ.UTF-8)
• Flutter version 1.7.8+hotfix.4 at /usr/lib/flutter
• Framework revision 20e59316b8 (10 days ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /home/kleinpetr/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: /opt/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at /opt/android-studio
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1)
• IntelliJ at /opt/idea-IU-191.7479.19
• Flutter plugin version 36.0.4
• Dart plugin version 191.7479.14
[✓] Connected device (1 available)
• Pixel • FA77T0304661 • android-arm64 • Android Q (API 28)
• No issues found!
这是来自assembleDebug的输出
[ +328 ms] Running Gradle task 'assembleDebug'... (completed in 14,6s)
[ +9 ms] "flutter run" took 17 818ms.
[ ] "flutter run" took 17 818ms.
Gradle task assembleDebug failed with exit code 1
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:507:5)
<asynchronous suspension>
#2 buildGradleProject (package:flutter_tools/src/android/gradle.dart:346:14)
<asynchronous suspension>
#3 buildApk (package:flutter_tools/src/android/apk.dart:34:9)
<asynchronous suspension>
#4 AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:426:13)
<asynchronous suspension>
#5 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:371:54)
<asynchronous suspension>
#6 HotRunner.run (package:flutter_tools/src/run_hot.dart:251:39)
<asynchronous suspension>
#7 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:469:37)
<asynchronous suspension>
#8 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:478:18)
<asynchronous suspension>
#9 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:383:33)
<asynchronous suspension>
#10 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#11 _rootRun (dart:async/zone.dart:1124:13)
#12 _CustomZone.run (dart:async/zone.dart:1021:19)
#13 _runZoned (dart:async/zone.dart:1516:10)
#14 runZoned (dart:async/zone.dart:1463:12)
#15 AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#16 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:375:20)
#17 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#18 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:396:21)
<asynchronous suspension>
#19 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#20 _rootRun (dart:async/zone.dart:1124:13)
#21 _CustomZone.run (dart:async/zone.dart:1021:19)
#22 _runZoned (dart:async/zone.dart:1516:10)
#23 runZoned (dart:async/zone.dart:1463:12)
#24 AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#25 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#26 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#27 new Future.sync (dart:async/future.dart:224:31)
#28 CommandRunner.run (package:args/command_runner.dart:112:14)
#29 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#30 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:22)
<asynchronous suspension>
#31 _rootRun (dart:async/zone.dart:1124:13)
#32 _CustomZone.run (dart:async/zone.dart:1021:19)
#33 _runZoned (dart:async/zone.dart:1516:10)
#34 runZoned (dart:async/zone.dart:1500:12)
#35 run.<anonymous closure> (package:flutter_tools/runner.dart:60:18)
<asynchronous suspension>
#36 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#37 _rootRun (dart:async/zone.dart:1124:13)
#38 _CustomZone.run (dart:async/zone.dart:1021:19)
#39 _runZoned (dart:async/zone.dart:1516:10)
#40 runZoned (dart:async/zone.dart:1463:12)
#41 AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#42 runInContext (package:flutter_tools/src/context_runner.dart:56:24)
<asynchronous suspension>
#43 run (package:flutter_tools/runner.dart:51:10)
#44 main (package:flutter_tools/executable.dart:62:9)
<asynchronous suspension>
#45 main (file:///usr/lib/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#46 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#47 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)