Title: Android Studio 2.2 Preview 1 error
Tags: groovy;android-gradle-plugin;build.gradle;android-studio-2.2;gradle-dependencies
Question: I have installed android studio 2.2 preview 1 but its throwing two errors
1st error is   dependency cannot be applied to groovy   And the 2nd When ever i am creating the other activity it throws an error
gradle sync failed: could not find property 'compile on org.gradle.api.internal.robertfischer@example.com.
build.gradle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.xyz.www.xyz"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
dataBinding {
enabled = true
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// Firebase
compile 'com.google.firebase:firebase-database:9.0.0'
compile 'com.google.firebase:firebase-auth:9.0.0'
compile 'com.google.firebase:firebase-config:9.0.0'
compile 'com.google.android.gms:play-services-appinvite:9.0.0'
compile 'com.google.firebase:firebase-messaging:9.0.0'
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.firebase:firebase-crash:9.0.0'
compile 'com.google.firebase:firebase-analytics:9.0.0'
// Android Support library
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
// Picasso
compile 'com.squareup.picasso:picasso:2.5.2'
// Testing dependencies
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:23.4.0'
apply plugin: 'com.google.gms.google-services'
build.gradle(project)
buildscript {
repositories {
jcenter()
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0-alpha1'
classpath 'com.google.gms:google-services:3.0.0'
// 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
Comment: What's your build file?

Comment: I have added the build file



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:05/22/16', 'FavoriteCount': 1.0, 'PostTypeId': 1, 'Tags': '<groovy><android-gradle-plugin><build.gradle><android-studio-2.2><gradle-dependencies>', 'Title': 'Android Studio 2.2 Preview 1 error', 'ViewCount': 208, 'id': 37378944, 'user_AboutMe': '<p>Dart, Flutter</p>\n', 'user_AccountId': 7720060.0, 'user_DisplayName': 'Tushar Rai', 'user_Reputation': 2212.0, 'user_Views': 271.0, 'user_id': 5846565.0}}