【发布时间】:2016-08-08 13:03:36
【问题描述】:
我最近将 Android Studio 更新到 2.0。我正在参加兼职课程,我必须从事提供的项目。当 gradle 尝试构建项目时,弹出一个对话框,要求我更新 android studio gradle 插件。当我点击更新时,标题中出现错误。
我的gradle文件如下:
Gradle 包装器:
#Wed Sep 30 11:56:02 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2-bin.zip
模块摇篮:
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.sam_chordas.stockhawk"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
compile 'net.simonvt.schematic:schematic:0.6.3'
compile 'com.melnykov:floatingactionbutton:1.2.0'
compile 'com.android.support:design:23.1.1'
compile('com.github.afollestad.material-dialogs:core:0.8.5.7@aar') {
transitive = true
}
}
项目 Gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2'
classpath 'com.google.gms:google-services:1.4.0-beta3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
我无法处理该项目,因为我无法构建它。如果有人遇到过这样的问题并解决了它,我真的很感激一些帮助,因为我浪费了很多时间。我应该提到这是一台 Windows 7 机器。
谢谢
【问题讨论】:
标签: android android-studio android-gradle-plugin gradle-plugin android-studio-2.0