首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android更新1.0中的Android注释错误

Android更新1.0中的Android注释错误
EN

Stack Overflow用户
提问于 2014-12-09 11:34:57
回答 1查看 5.9K关注 0票数 10

我正在与Android Annotations合作,今天我为Android Studio 1.0.做了新的更新

当我构建这个项目时,它给了我一个错误:

代码语言:javascript
复制
Error:(40, 0) Could not find property 'processResources' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@54335f5.

这是我的build.gradle my project文件

代码语言:javascript
复制
    // 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.0.0'


        // the latest version of the android-apt plugin https://bitbucket.org/hvisser/android-apt
        // http://stackoverflow.com/a/25939518
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}


allprojects {
    repositories {
        jcenter()
    }
}

这是用于build.gradlemy application文件

代码语言:javascript
复制
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
// duhet per te shtuar librarine e android annotations ne ccompile time http://joostfunkekupper.com/useful-android-libraries/
// https://github.com/excilys/androidannotations/wiki/IntelliJIDEA
android {
    compileSdkVersion 21
    buildToolsVersion '21.1.1'
    defaultConfig {
        applicationId "<my package>"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}
// https://github.com/excilys/androidannotations/wiki/FAQ
// https://github.com/DayS/androidannotations/wiki/Building-Project-Gradle
//https://bitbucket.org/hvisser/android-apt
apt {// http://stackoverflow.com/a/26284580
    arguments {
        androidManifestFile variant.processResources.manifestFile
        // This should of course be your own package name
        resourcePackageName '<my package>'

    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile project(':FreeFlow')
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
    compile 'com.squareup.retrofit:retrofit:1.7.0'
    compile project(':library')
    compile project(':facebook')
    compile project(':viewPagerIndicatorLibrary')
    compile 'com.google.code.gson:gson:2.3'
    compile 'com.android.support:support-v4:21.0.0'
    compile 'com.neenbedankt.gradle.plugins:android-apt:1.4'
    apt 'org.androidannotations:androidannotations:3.2'
    compile 'org.androidannotations:androidannotations-api:3.2'
    compile 'com.squareup:otto:1.3.5'
    compile 'com.paymill.android:android-sdk:1.2.0'
}

发生错误的Line 40位于第二个build.gradle中:

代码语言:javascript
复制
androidManifestFile variant.processResources.manifestFile

有没有人遇到过这个问题,因为我找不到解决这个问题的办法

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-12-09 12:56:38

新版本的Android有一些需要修改的地方。

请参阅this wiki page以获得build.gradle的示例。

请注意这一行:

代码语言:javascript
复制
androidManifestFile variant.outputs[0].processResources.manifestFile
票数 16
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27377987

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档