【发布时间】:2018-06-29 08:05:32
【问题描述】:
我在将 Eclipse 项目导入 Android Studio 时遇到此错误。它显示了一个建议将库Gradle: com.android.support:support-core-utils-27.1.1 添加到类路径。我已将库添加到我的 build.gradle 文件中。
这是我的 gradle 文件。
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "28.0.0"
defaultConfig {
applicationId "com.example.tracking"
minSdkVersion 17
targetSdkVersion 27
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
allprojects {
repositories {
google()
}
}
dependencies {
implementation project(':asciiProtocol')
implementation project(':deviceList')
implementation project(':captureActivity')
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "com.android.support:support-core-utils:27.1.1"
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.code.gson:gson:2.8.2'
implementation files('libs/opencsv-2.3.jar')
implementation files('libs/rfid.reader.api.jar')
implementation files('libs/scannercontrol.jar')
implementation files('libs/Zebra.jar')
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
}
}
}
我用谷歌搜索了它,但找不到合适的解决方案。但是,我尝试了this 的解决方案,但这不是正确的解决方案。任何帮助表示赞赏?
【问题讨论】:
-
你尝试
Clean Project然后Make Project在android studio的构建标签?
标签: android broadcastreceiver localbroadcastmanager