could not find gradle 3.0.0-alpha4

前端 未结 2 956
既然无缘
既然无缘 2021-02-20 03:04

a few days ago i have installed android studio 3.0 (preview) and after that in stable version (studio 2.3.3) when i try to import project it give me an error. In preview everyth

相关标签:
2条回答
  • 2021-02-20 03:52

    If you're opening an existing project using Android Studio 3.0 Preview 1 or later, follow the prompts to automatically update your project to the latest version of the Android plugin. To manually update your project, include the maven repo and change the plugin version in your project-level build.gradle file as follows:

    Open your Project level build.gradle Section .

    You should add maven { url 'https://maven.google.com' } .

    Example

     buildscript {
            repositories {
                jcenter()
                 // You need to add the following repository to download the new plugin.
                 maven { url 'https://maven.google.com' }
            }
            dependencies {
                classpath 'com.android.tools.build:gradle:3.0.0-alpha4' // Same for alpha6
    
            }
        }
    
        allprojects {
            repositories {
                jcenter()
                maven { url 'https://maven.google.com' }
            }
        }
    
    0 讨论(0)
  • 2021-02-20 04:03

    A better way may be just to use

    buildscript {
        repositories {
            google()
        }
    
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.0'
        }
    }
    
    0 讨论(0)
提交回复
热议问题