Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade issue in gradle build tools version from 1.2.3 to 1.3.1

I've upgraded the gradle build tools from 1.2.3 to 1.3.1 and started seeing the following error on gradle sync. I had no issues with 1.2.3 version. I'm on gradleVersion 2.3. Is there anyway I can avoid this error?

Error:Your project contains 2 or more modules with the same identification com.salesforce.android:AndroidCommon at ":AndroidCommon" and ":AndroidCommon:AndroidCommon". You must use different identification (either name or group) for each modules.

AndroidCommon is one of the libraries that I'm using. I tried with versions 1.3 and 1.4 of Android Studio. Seems like the AS version doesn't matter.

like image 810
gatorboy Avatar asked Nov 04 '15 19:11

gatorboy


People also ask

How do I update my build tools?

The Build Tools version of your project is (by default) specified in a build. gradle file, most likely in the app sub directory. Open the file and change/specify the Build Tools version you want to use by adding/changing a buildToolsVersion property to the android section: android { buildToolsVersion "24.0.

How do I find Gradle build tools version?

Look at your build. gradle (Module:<app-name>) file. There should be a buildToolsVersion line in that file. Make sure that you and others have that version of the build tools installed.

Could not find com android tools build Gradle 3.2 1 searched in the following locations?

Go Settings/Gradle/Android Studio. Then check "Enable embedded Maven repository". And you're good to go.


1 Answers

This kind of error happens in these cases:

  • 2 modules have the same identification (group+name). Check the code
  • 1 module has the same name of the root project

In the first case:

  • rename one of the modules
  • update the settings.gradle file with the new name
  • run gradlew clean assemble

In the second case.

  • rename the root project or follow the steps above.`

This check was introduced with gradle-plugin 1.3.x. You can check the code:

  • gradle plugin 1.3.1
  • gradle plugin 1.2.3
like image 99
Gabriele Mariotti Avatar answered Nov 15 '22 08:11

Gabriele Mariotti