私は自分のプロジェクトにエスプレッソ投稿ライブラリを追加しようとしています。ここに私のbuild.gradleファイルには、次のとおりです。Androidのコンフリクトと依存関係のコンパイル
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "example.com.littlebox_hari"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
/*configurations.all {
resolutionStrategy {
force 'com.android.support:appcompat-v7:23.4.0'
}
}*/
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.squareup.retrofit2:retrofit:2.0.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0'
androidTestCompile 'com.android.support.test:runner:0.4'
androidTestCompile 'com.android.support.test:rules:0.4'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-idling-resource:2.2.2'
compile 'com.android.support:support-annotations:23.4.0'
testCompile 'com.android.support:support-annotations:23.4.0'
androidTestCompile 'com.android.support:support-annotations:23.4.0'
}
私はこのエラーを取得する:
Error:Conflict with dependency 'com.android.support:appcompat-v7'. Resolved versions for app (23.4.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
私は私のbuild.gradleファイル内の行のコメントを解除した場合、私が手:
Error:(72) Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Display1'.
Error:(75) Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
Error:(79) Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
Error:(76) Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
Error:(82) Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
Error:(89) Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Button'.
D:\Littlebox-Hari\app\build\intermediates\exploded-aar\com.android.support\design\23.1.1\res\values\values.xml
Error:(97, 5) No resource found that matches the given name: attr 'textAllCaps'.
Error:(102, 5) No resource found that matches the given name: attr 'elevation'.
Error:(113, 5) No resource found that matches the given name: attr 'backgroundTint'.
Error:(113, 5) No resource found that matches the given name: attr 'elevation'.
Error:(122, 5) No resource found that matches the given name: attr 'elevation'.
Error:(131, 5) No resource found that matches the given name: attr 'elevation'.
編集:build.gradleファイルに次の行を追加しました:
testCompile 'com.android.support:appcompat-v7:23.4.0'
androidTestCompile 'com.android.support:appcompat-v7:23.4.0'
私はまだ同じエラーが発生します。
あなたはエラーが提供されたURLを読みましたか? –
[Gradle:アプリとテストアプリの解決版が異なる]の可能な複製(http://stackoverflow.com/questions/34650509/gradle-resolved-versions-for-app-and-test-app-differ) –
編集済み - 私は同じエラーを受けた – rhari