Android应用程序Azure依赖项渐变生成时出错
我在Gradle sync的Android Studio 2.3.3上遇到以下错误: “`Error:Module'com.microsoft.azure:azure mobile android:3.3.0'依赖于一个或多个android库,但它是一个jar。” 如果我使用Android应用程序Azure依赖项渐变生成时出错,android,azure,android-studio,android-gradle-plugin,Android,Azure,Android Studio,Android Gradle Plugin,我在Gradle sync的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
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)。我查看了GitHub上的源代码,和之间的
build.gradle
的区别在于3.3.0
版本需要依赖性com.android。支持:customtabs:23.0.1
,但3.1.0
版本不需要。因此,由于com.Android,您需要将compileSdkVersion
和targetSdkVersion
值从25
降级到23
,以支持所需的安卓库来解决它。支持:customtabs:23.0.1
属于安卓API 23。不幸地降级到23,重建和梯度同步没有任何区别。我的结论是使用compile('com.microsoft.azure:azure-mobile-android:3.3)。0@aar“)
使错误消失。希望他们能在下一版本中修复它。