Reputation: 54
I have this gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.estimote:sdk:1.4.0'
compile 'com.android.support:appcompat-v7:27.0.1'
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true;
}
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.afollestad.material-dialogs:core:0.9.5.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
}
I have problem with appcompat-v7:27.0.1 and the google play services. if I use the 26.0.1 there is not problem with the google play services but cant use the afollestand 0.9.5.0. I need the afollestand 0.9.5.0 that works with appcompat-v7:27
UPDATE: Gradle image
Upvotes: 2
Views: 1716
Reputation: 54
I try Everything, but the real answer was wait to and update of play-services. now my gradle looks like:
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "xxx.YYY"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "https://maven.google.com"
}
}
dependencies {
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.google.android.gms:play-services-maps:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.maps.android:android-maps-utils:0.5'
compile 'com.afollestad.material-dialogs:core:0.9.6.0'
testCompile 'junit:junit:4.12'
And have 0 errors.
Upvotes: 0
Reputation: 3753
I've had the same problem. What user raghunandan suggested helps.
Using ./gradlew app:dependencies
in your Apps folder ( or ./gradlew.bat app:dependencies
on Windows), you get the dependency tree of all the packages.
There you can see that 'play-services-maps' requires some support packages with version 25.2.0
, but most of them get upgraded to 27.0.2. But not all for some reason. You can do this manually though, by including them directly! (They will be part of your APK anyway)
compile 'com.android.support:support-v4:27.0.2'
add that in your apps build.gradle alongside support-v7 and it'll work.
Upvotes: 3