2016-04-24 47 views
2

我按照教程here使用Firebase和Google App Engine設置我的Android應用程序。一切正常,直到我加入谷歌應用程序引擎模塊,然後構建gradle這個過程中出現以下錯誤:Gradle同步失敗:預期配置':backend:appengineSdk'只包含一個文件,但不包含文件

Gradle sync failed: Expected configuration ':backend:appengineSdk' to contain exactly one file, however, it contains no files. 

人有什麼想法?沒有這種類型的錯誤的參考,我迷路了!

我的項目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' 

     // 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產出:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "com.joelmin.sharemon" 
     minSdkVersion 15 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
    } 
    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' 
    } 
} 

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

App Engine的gradle產出:

// If you would like more information on the gradle-appengine-plugin please refer to the github page 
// https://github.com/GoogleCloudPlatform/gradle-appengine-plugin 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.google.appengine:gradle-appengine-plugin:1.9.28' 
    } 
} 

repositories { 
    jcenter(); 
} 

apply plugin: 'java' 
apply plugin: 'war' 
apply plugin: 'appengine' 

sourceCompatibility = JavaVersion.VERSION_1_7 
targetCompatibility = JavaVersion.VERSION_1_7 

dependencies { 
} 

appengine { 
    downloadSdk = true 
    appcfg { 
    oauth2 = true 
    } 
} 
+1

我覺得appengineSdk沒有正確下載。 – USKMobility

+0

我如何再次下載它?我已經添加它作爲一個gradle依賴和Android Studio只是下載它自己... –

+0

btw我可以看到它正確下載〜/ .gradle/caches –

回答

1

所以我解決了這個刪除現有的應用程序引擎模塊,並重新創建一個與不同的名稱然後所有窩很好......很奇怪......

相關問題