Upgrading project to Android Studio 1.0 (Gradle problems)

后端 未结 3 1283
轻奢々
轻奢々 2021-02-08 03:47

Just to start I\'m very new to android development/android studio/gradle so forgive me if I\'m asking a stupid question.

My team has been working on a project with the b

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-08 04:35

    I was having the same issue that you were and had made the exact same updates as described in the Google docs.

    The error I was making was editing my app module's build.gradle, and not the project's build.gradle in the root of the project folder for the com.android.tools.build version.

    Here's the updated PROJECT's build.gradle file that I'm using that works.

    // Top-level build file where you can add configuration options common to all sub-  projects/modules.
    
    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:1.0.0'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    
    ext {
        compileSdkVersion = 21
        buildToolsVersion = "20.0.0"
    
        minSdkVersion = 15
        targetSdkVersion = 21
    }
    
    allprojects {
        repositories {
            jcenter()
        }
    }
    

提交回复
热议问题