gpt4 book ai didi

android - 警告:需要版本2.10。当前版本是2.4

转载 作者:行者123 更新时间:2023-12-03 05:13:32 27 4
gpt4 key购买 nike

我试图使用GCM实现Android推送通知。以下是我得到的错误

最新错误

  Warning:Gradle version 2.10 is required. Current version is 2.4. If using the gradle wrapper, try editing the distributionUrl in C:\Users\seng\AndroidStudioProjects\ChatApp\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip

Can't start Git: git.exe
Probably the path to Git executable is not valid. Fix it. (show balloon)

应用程序级别build.gradle文件
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.example.seng.chatapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

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

//This line is added
compile 'com.google.android.gms:play-services-gcm:8.3.0'
}

//This line is added
apply plugin: 'com.google.gms.google-services'

项目级别build.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:1.3.0'

//These two lines are added
classpath 'com.google.gms:google-services:1.5.0-beta2'
classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

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

gradle-wrapper.properties
#Mon Jul 18 23:51:22 SGT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
https\://services.gradle.org/distributions/gradle-2.10-all.zip=

最佳答案

您需要编辑gradle/wrapper/gradle-wrapper.properties

distributionUrl更改为https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

关于android - 警告:需要版本2.10。当前版本是2.4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38440771/

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