1

I have started to learn Android. I am trying to work on Google Map APIs. My app is crashing every time I am trying to launch it, upon investigation I found one notification in build.gradle file.

Please refer this image to see the message from compiler

I changed com.android.support.constraint:constraint-layout:1.0.0-alpha7 to com.android.support.constraint:constraint-layout:1.0.0-alpha9 to support compileSdkVersion 26. I am not finding any relevant links on Google to fix this issue.

halfer
  • 19,824
  • 17
  • 99
  • 186
Shashank Vivek
  • 16,888
  • 8
  • 62
  • 104

2 Answers2

1

Your compile sdk version is greater than your support libraries,

try modifying your gradle as

android {
...
compileSdkVersion 25
...
}

and within the dependency you can add

compile 'com.android.support.constraint:constraint-layout:1.0.2'

Aishwarya
  • 987
  • 3
  • 10
  • 26
0

Please refer to this post, if you run the Gradle command you can see what of your dependencies has a different buildtools version.

From the post:

Run a Gradle dependency report to see what your full tree of dependencies is. From there, you will see which one of your libraries is asking for a different version of the Android Support libraries. For whatever it is asking for, you can ask for it directly with the 25.2.0 version, or use Gradle's other conflict resolution approaches to arrange to get the same version.

Run:

./gradlew -q dependencies <module-name>:dependencies --configuration compile

Example:

./gradlew -q dependencies app:dependencies --configuration compile
Jon
  • 9,156
  • 9
  • 56
  • 73
Stortz
  • 11
  • 1
  • 2