【发布时间】:2015-11-13 11:45:27
【问题描述】:
我在具有 HERE Maps 片段的活动上收到 MISSING_LIBRARIES 错误,每当 HERE Maps 尝试通过 init() 方法初始化地图然后使用 onEngineInitializationCompleted 调用时,错误就来自 HERE Maps错误代码MISSING_LIBRARIES。在我添加 card.io 对 build.gradle 文件的依赖之前,它工作正常。
所以我使用的是 card.io 版本 5.1.2,HERE Maps 版本是 3.0.2 Premium SDK for Android。 Android 的 minSdkVersion 为 14
我应该怎么做才能阻止 card.io 依赖与 HERE 地图发生冲突?
build.gradle 脚本文件
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 22
buildToolsVersion '21.1.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode getBuildNumber()
versionName "3.0.0"
applicationId "com.example"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled false
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
repositories {
mavenCentral()
flatDir {
dirs 'lib'
}
}
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'org.roboguice:roboguice:3.0.1'
compile 'io.card:android-sdk:5.1.2'
provided 'org.roboguice:roboblender:3.0.1'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.google.code.gson:gson:2.3.1'
compile files('lib/HERE-sdk.jar')
compile 'com.google.guava:guava:18.0'
compile 'com.wdullaer:materialdatetimepicker:1.4.2'
compile 'com.google.android.gms:play-services-analytics:7.8.0'
compile 'com.google.android.gms:play-services-gcm:7.8.0'
compile 'com.pubnub:pubnub-android:3.7.5'
compile 'org.joda:joda-convert:1.8'
compile 'org.joda:joda-money:0.10.0'
compile ('commons-validator:commons-validator:1.4.1'){
transitive = false
}
}
【问题讨论】:
-
你能发布构建 gradle 脚本吗?
-
谢谢,我已经用我的 build.gradle 脚本文件更新了这个问题。
-
你怎么知道 card.io 有冲突?如果您能够通过更简单的示例重现此内容,请提供示例项目,以便我们提供更好的帮助。