0

I have recently updated android studio. and updated other plugins, now everything is missed up even if I return to previous gradle file.

my app is using google maps and directions, still using extends of fragment

project structure looks as following:

project structure

Gradle version: 4.1

Android Plugin version: 3.0.1

Android Plugin repo: jcenter, maven { url 'https://maven.google.com/' name 'Google' }

and the gradle file:

    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 27
        buildToolsVersion "27.0.3"
        defaultConfig {
            applicationId "com.***"
            minSdkVersion 16
            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'
            }
        }
        productFlavors {
        }
    }

    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        compile 'com.android.support:appcompat-v7:27.+'
        compile 'com.google.android.gms:play-services:11.8.0'
        testCompile 'junit:junit:4.12'
    }

in one activity I have:

    import android.support.v4.app.FragmentActivity;

I see the following error on:

   compile 'com.android.support:appcompat-v7:27.+' 

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.0.2, 25.2.0. Examples include com.android.support:animated-vector-drawable:27.0.2 and com.android.support:mediarouter-v7:25.2.0 less... (Ctrl+F1) There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)

I have also tried running:

    ./gradlew -q dependencies app:dependencies --configuration compile

it failed on JAVA_HOME, after I set it by: set JAVA_HOME="C:.../jdk***"

It did not work complaining on JAVA_HOME again

can anyone help please ? by telling me how to fix such problems or how can I fix this one ?

Thanks a lot!

AndroidDev
  • 101
  • 1
  • 1
  • 9

0 Answers0