我在 Android Studio 2.3.3 的 Gradle 同步中收到以下错误:
“‘错误:模块‘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)。
我查看了源代码azure-mobile-apps-android-client https://github.com/Azure/azure-mobile-apps-android-client在 GitHub 上,以及两者的区别build.gradle
之间3.1.0 https://github.com/Azure/azure-mobile-apps-android-client/blob/3.1.0/sdk/src/sdk/build.gradle and 3.3.0 https://github.com/Azure/azure-mobile-apps-android-client/blob/3.3.0/sdk/src/sdk/build.gradle是那个版本吗3.3.0
需要依赖com.android.support:customtabs:23.0.1
,但是版本3.1.0
不是。所以你需要降级compileSdkVersion
& targetSdkVersion
价值来自25
to 23
支持解决该问题所需的 Android 库,因为com.android.support:customtabs:23.0.1
属于Android API 23。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)