Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Android Studio Update 1.0的Android注释错误大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用 Android Annotations,而今天我为Android studio 1.0做了新的更新.

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

Error:(40,0) Could not find property 'processresources' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@54335f5.

这是我的项目的build.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:1.0.0'


        // the latest version of the android-apt plugin https://bitbucket.org/hvisser/android-apt
        // https://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.gradle文件

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 {// https://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'
}

40号错误发生在第二次build.gradle:

androidManifestFile variant.processresources.manifestFile

有没有人遇到这个问题,因为我找不到任何解决方案的这个问题

谢谢

解决方法

使用新版本的Android studio进行一些更改.
请参见 this wiki page获取build.gradle的示例.
注意这一行:
androidManifestFile variant.outputs[0].processresources.manifestFile

大佬总结

以上是大佬教程为你收集整理的Android Studio Update 1.0的Android注释错误全部内容,希望文章能够帮你解决Android Studio Update 1.0的Android注释错误所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。