我绝对不是Android开发领域的新手,如果这是一个愚蠢的问题,请原谅。
我继承了一个非常老的Android代码库,该代码库使用了不推荐使用的Intercom SDK。我按照https://www.intercom.com/help/articles/2723-upgrade-to-the-new-messenger-android上的说明进行操作,并在build.gradle
中更改了以下几行...
compile('io.intercom.android:intercom-sdk:1.1.1@aar') {
transitive = true
}
...按照博客文章中的建议进行操作,即:
compile ('io.intercom.android:intercom-sdk:3.+')
不幸的是,尝试构建项目时,现在会导致一系列以下错误:
Error:(6) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(36) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
我尝试了以下各种变化,但没有任何效果:
compile ('io.intercom.android:intercom-sdk:3.+@aar') {
transitive = true
}
阅读类似问题的答案后,我意识到这可能与SDK版本(或某些支持/兼容性库版本)有关,因此这是我的gradle文件中的相关设置:
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId 'com.vacationlabs.backoffice'
minSdkVersion 17
targetSdkVersion 22
versionCode 11
versionName "1.1.1"
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:gridlayout-v7:22.2.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.bartoszlipinski.recyclerviewheader:library:1.2.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okio:okio:1.5.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.daimajia.swipelayout:library:1.2.0@aar'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.roomorama:caldroid:2.1.0'
compile 'com.squareup:otto:1.3.8'
compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.android.gms:play-services-analytics:7.8.0'
compile 'com.github.satyan:sugar:1.3'
compile 'com.github.clans:fab:1.6.1'
// compile ('io.intercom.android:intercom-sdk:3.+')
// compile ('io.intercom.android:intercom-sdk:3.+@aar') {
// transitive = true
// }
compile('io.intercom.android:intercom-sdk:1.1.1@aar') {
transitive = true
}
}
答案 0 :(得分:0)
您必须使用命令./gradlew app:dependencies
检查依赖关系树。
您的某些依赖项与支持库xx具有传递依赖项。 您必须(至少)使用相同版本的支持库进行编译
compileSdkVersion XX