gpt4 book ai didi

android - Android gradle问题(当前2.4必需2.8)Android Studio

转载 作者:行者123 更新时间:2023-12-03 05:14:36 24 4
gpt4 key购买 nike

我在尝试实现gcm时遇到问题。当我尝试同步Gradle文件时,出现此错误:

Warning:Gradle version 2.8 is required. Current version is 2.4. If using the gradle wrapper, try editing the distributionUrl in D:\MyProjects\Android\Enjoy\gradle\wrapper\gradle-wrapper.properties to gradle-2.8-all.zip

尝试转到包装器并将其更改为2.8,但仍无法正常工作。

这是我的应用程序build.gradle:
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "enjoy.enjoyprague_restaurants_bars"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
dexOptions {
javaMaxHeapSize "4g"
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// android libraries activity, design
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'

// application
compile 'com.android.support:multidex:1.0.1'

// volley for handlers
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.google.code.gson:gson:2.4'

// picasso
compile 'com.squareup.picasso:picasso:2.5.2'

// simple xml
compile('org.simpleframework:simple-xml:2.7.1') {
exclude group: 'stax', module: 'stax-api'
exclude group: 'xpp3', module: 'xpp3'
}

// floating action menu
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'

// Google Map api
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.maps.android:android-maps-utils:0.4'
}
//google gcm sender
apply plugin: 'com.google.gms.google-services'

和顶级构建gradle:
// 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:2.0.0-alpha3'
classpath 'com.google.gms:google-services:2.0.0-alpha3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

最佳答案

好的,所以Android Studio的问题非常严重。现在,您需要做的就是去问这个问题,并按照他们在那里所说的去做。将其离线处理。它将保证工作。

https://stackoverflow.com/a/21996772/4458300

关于android - Android gradle问题(当前2.4必需2.8)Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34787311/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com