【发布时间】:2017-06-27 19:43:03
【问题描述】:
我在 Gradle 同步时在 Android Studio 2.3.3 上收到以下错误:
"`Error:Module 'com.microsoft.azure:azure-mobile-android:3.3.0' 依赖于一个或多个 Android 库,但它是一个 jar。"
如果我使用,错误就会消失
compile 'com.microsoft.azure:azure-mobile-android:3.1.0'
而不是
compile 'com.microsoft.azure:azure-mobile-android:3.3.0'
但我不想使用过时的版本。
build.gradle 文件是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.my_software.myapp"
minSdkVersion 14
targetSdkVersion 25
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.android.gms:play-services-drive:11.0.1'
compile 'com.google.android.gms:play-services-plus:11.0.1'
//FOR microsoft Azure
compile 'com.microsoft.azure:azure-mobile-android:3.3.0'
}
临时解决方案:
compile('com.microsoft.azure:azure-mobile-android:3.3.0@aar')
(在末尾添加@aar)。
【问题讨论】:
标签: android azure android-studio android-gradle-plugin