0

I would like to import the following project into android studio 3.2 : https://github.com/0xPoly/Strongbox

But it looks like I have then problem with gradle :

I first choose the import a project (gradle, Eclipse...) from android studio and choose the folder where I have a copy of the github folder

I have then a Sync failes error with the following message :

Unsupported method: BaseConfig.getApplicationIdSuffix(). The version of Gradle you connect to does not support that method. To resolve the problem you can change/upgrade the target version of Gradle you connect to. Alternatively, you can ignore this exception and read other information from the model.

I then change in build.gradle classpath 'com.android.tools.build:gradle:1.1.0' to classpath 'com.android.tools.build:gradle:4.0'

and change in gradle-wrapper

distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

To

distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip

and hit Try again

Then after downloading the gradle-4.0-all.zip I get the following error :

Could not find com.android.tools.build:gradle:4.0. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/4.0/gradle-4.0.pom https://jcenter.bintray.com/com/android/tools/build/gradle/4.0/gradle-4.0.jar https://maven.google.com/com/android/tools/build/gradle/4.0/gradle-4.0.pom https://maven.google.com/com/android/tools/build/gradle/4.0/gradle-4.0.jar

And I still have the same thing with all versions I tried from 3.0 to 4.10.2

I tried adding google() to the repositories just before jcenter() but this did not worked

What should I do ?

itsmysterybox
  • 2,748
  • 3
  • 21
  • 26
devjane
  • 1
  • 2
  • Try these [answers](https://stackoverflow.com/questions/25348339/how-to-import-an-existing-project-from-github-into-android-studio) – itsmysterybox Oct 04 '18 at 11:55

1 Answers1

0
  1. change distributionUrl to https\://services.gradle.org/distributions/gradle-3.3-all.zip here: https://github.com/0xPoly/Strongbox/blob/master/gradle/wrapper/gradle-wrapper.properties

  2. In build.gradle set classpath 'com.android.tools.build:gradle:2.3.2' instead 'com.android.tools.build:gradle:1.1.0'

igor_rb
  • 1,821
  • 1
  • 19
  • 34
  • This almost work I was told to The SDK Build Tools revision (21.1.2) is too low for project ':app'. Minimum required is 25.0.0 and asked to Update Build Tools version and sync project which I did and then I got the following error Process 'command 'C:\Users\user1\AppData\Local\Android\Sdk\build-tools\25.0.0\aapt.exe'' finished with non-zero exit value 1 – devjane Oct 04 '18 at 15:12