firebase与sputter的集成与地理位置依赖性不成功

时间:2018-05-14 09:22:55

标签: firebase flutter

我想知道当我将firebase与颤振整合在一起时它是完美的, 但是如果我在依赖项中添加地理位置包:

dependencies:
  flutter:
    sdk: flutter
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.0
geolocation: ^0.2.1

编译项目时,我在调试中得到了这条消息:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task 
':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: 
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or -- 
debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
Finished with error: Gradle build failed: 1

知道发生了什么。?

1 个答案:

答案 0 :(得分:1)

我认为你的问题是缩进。

尝试

dependencies:
  flutter:
    sdk: flutter
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.0
  geolocation: ^0.2.1