2013-09-28 64 views
2

在Android工作室中,我只是想爲android項目定義一個自定義項目結構(跟着這個,http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Project-Structure),但是當運行: ./格式化任務 我得到了錯誤:發生了一個評估根項目'greendao-example'的問題。沒有方法的簽名:org.gradle.api.java.archives.internal.DefaultManifest.srcFile()

No signature of method: org.gradle.api.java.archives.internal.DefaultManifest.srcFile() is applicable for argument types: (java.lang.String) values: [AndroidManifest.xml]

的的build.gradle是:

buildscript { 
    repositories { 
     mavenCentral() 
} 

    dependencies { 
    classpath 'com.android.tools.build:gradle:0.5.+' 
    } 

} 

apply plugin: 'android' 
apply plugin: 'java' 

    repositories { 
mavenCentral() 
} 

dependencies { 
compile 'com.android.support:support-v4:13.0.+' 
} 

android { 
    testBuildType = "debug" 

    defaultConfig { 
    versionCode = 1 
    versionName = "0.1" 
    minSdkVersion = 9 
    targetSdkVersion = 17 


    compileSdkVersion = 17 
    buildConfig "private final static boolean DEFAULT = true;", \ 
       "private final static String FOO = \"foo\";" 
    } 

    buildTypes { 
    debug { 
     packageNameSuffix = ".debug" 

     buildConfig "private final static boolean DEBUG2 = false;" 
    } 
    } 

    aaptOptions { 
    noCompress "txt" 
    } 
    sourceSets {   
    manifest.srcFile 'AndroidManifest.xml' 

    } 
} 

回答

相關問題