Gradle version 1.8 is required. Current version is 1.6

后端 未结 11 988
面向向阳花
面向向阳花 2020-12-09 02:37

There is a new Android Studio update: https://sites.google.com/a/android.com/tools/recent/androidstudio030released

The link says:

The improved per

相关标签:
11条回答
  • 2020-12-09 03:00

    You should use the following in your build.gradle:

    buildscript {
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.7.+'
      }
    }
    

    Edit: Nowadays 0.9.+ is the most up-to-date gradle plugin.

    0 讨论(0)
  • 2020-12-09 03:01

    I had same problem. Try to remove directory 'gradle' in project directory and then rebuild project. It helped me.

    0 讨论(0)
  • 2020-12-09 03:02

    I am not sure if this will help you but here is what fixed it for me:

    Open up this file in your project:

    <Project>/gradle/wrapper/gradle-wrapper.properties

    Edit the distributionUrl line and set it too:

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

    Rebuild your project.

    Update: You might want to use gradle-2.8-all.zip now.

    0 讨论(0)
  • 2020-12-09 03:04

    Similar Issue :

    Just updated android studio :p

    Help -> Check for Update...

    0 讨论(0)
  • 2020-12-09 03:09

    This is a late response, but in case anybody's run into a problem of the gradle version in their ionic project being overwritten by an older one by AS, just remove the android platform from your ionic project and then re-add it. Evidently, installing Gradle is part of that command, so you'll overwrite the overwrite, and get the version you need to run ionic build android from within your Ionic project's root directory.

    Although, WARNING: Removing the Android platform, and then re-installing it, might wipe the splashscreens and icons that you'd had in your resources folder. And by "might," I mean that it's happened every time that I've done it (which makes sense, since the resources folder is inside of the android folder that you're removing/re-intalling). Perhaps a more eloquent command line input could reinstall the android platform while leaving the resources folder alone, but, in any case, make sure to copy the directory with your custom splashscreens and icons to a new one before running the re-install.

    0 讨论(0)
提交回复
热议问题