【发布时间】:2020-06-04 17:38:22
【问题描述】:
我正在尝试为 Flutter 运行这个 HERE 地图示例:
https://github.com/etzuk/flutter_here_maps
。我已按照 README 说明进行操作:
Android gradle。
Import HERE-sdk.aar as aar module. (AndroidStudio) File -> New -> New Module -> Import .jar/.aar module. Add your keys to manifest and service as described at HereMaps guide Change the intent-filter in HereMaps Service to app package name.
我正在尝试运行该示例,但它仍然给了我这个:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :HERE-sdk.
Required by:
project :app > project :flutter_here_maps
> Unable to find a matching configuration of project :HERE-sdk: None of the consumable configurations have attributes.
* 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.
我将 HERE-sdk.aar 文件添加到 Android 应用目录中的 libs 文件夹中。使用File -> New -> New Module -> Import .jar/.aar module 选项导入文件,在Project Structure 中添加了模块,但我看不到它。如果我再试一次,它会显示“项目已经包含名为 HERE-sdk 的子项目”,但它在列表中不可见。
我还在应用级 build.gradle 文件中添加了以下内容,就像我在一个有效的 Android 项目中所做的那样:
repositories {
flatDir {
dirs 'libs'
}
mavenCentral()
}
dependencies {
implementation(name: 'HERE-sdk', ext: 'aar')
...
}
【问题讨论】:
-
你是否在 android/lib 文件夹中包含 HERE-sdk?
标签: java android gradle flutter here-api