Android studio 未找到Gradle DSL方法:';苹果';
如何解决此gradle错误 错误:(43,0)找不到Gradle DSL方法:“apple()” 可能原因:Android studio 未找到Gradle DSL方法:';苹果';,android-studio,android-gradle-plugin,build.gradle,Android Studio,Android Gradle Plugin,Build.gradle,如何解决此gradle错误 错误:(43,0)找不到Gradle DSL方法:“apple()” 可能原因:项目“DeChat”可能使用的Android Gradle插件版本不包含该方法(例如,在1.1.0中添加了“testCompile”)。 将插件升级到2.3.3版并同步project项目“DeChat”可能使用的Gradle版本不包含该方法。 打开Gradle包装文件生成文件可能缺少Gradle插件。 应用Gradle插件 建造:格拉德尔 apply plugin: 'com.an
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.suvysoft.dechat"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.design:25.1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
//firebase
compile 'com.google.firebase:firebase-database:9.6.1'
compile 'com.google.firebase:firebase-messaging:9.6.1'
compile 'com.google.firebase:firebase-auth:9.6.1'
//okhttp
compile 'com.squareup.okhttp3:okhttp:3.4.1'
//event bus
compile 'org.greenrobot:eventbus:3.0.0'
}
apple plugin: 'com.google.gms.google-services'
Build.Gradle(项目)
这是您的错误:
apple plugin: 'com.google.gms.google-services'
它必须是:
apply plugin: 'com.google.gms.google-services'
只有一个打字错误。。。。苹果?!走开!!你不再是我的朋友了!!;)
apply plugin: 'com.google.gms.google-services'