相关疑难解决方法(0)

无法使用AndroidAnnotations库在AndroidStudio中制作项目

我已经看过几个关于在Android Studio中使用AndroidAnnotations框架编译Android应用程序的讨论和博客,特别是这个,但没有一个帮助我开始.

我正在使用Android Studio 0.8.9,我指向下载的Gradle 2.1二进制文件.我正在使用Ubuntu 14.04.

gradle编译过程说我在给定位置缺少AndroidManifest.xml的副本(请参阅下面的输出)虽然我在使用文件浏览器导航到此文件夹时找到了它.

另请注意,为了删除警告,我更换了

variant.processResources.manifestFile
Run Code Online (Sandbox Code Playgroud)

通过

variant.outputs.processResources.manifestFile
Run Code Online (Sandbox Code Playgroud)

在gradle脚本中.

这是我的gradle构建脚本:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.13.2'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.3'
    }
}

apply plugin: 'android'

repositories {
    mavenCentral()
}

configurations {
    apt
}

dependencies {
    compile fileTree(include: '*.jar', dir: 'libs')
    compile files('libs/androidsvg-1.2.1.jar')
    compile 'com.android.support:appcompat-v7:20.0.0'
    compile 'org.androidannotations:androidannotations-api:3.0'
    apt 'org.androidannotations:androidannotations:3.0'
}

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 20
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs …
Run Code Online (Sandbox Code Playgroud)

android gradle android-annotations android-studio

16
推荐指数
1
解决办法
1万
查看次数

Android Gradle插件0.13和android-apt 1.3出错

我刚刚将我的android gradle插件从0.12更新到0.13.此外,我已经下载了gradle 2.1.然后,我尝试使用android studio 0.8.9测试版但是根据http://tools.android.com/tech-docs/new-build-system/version-compatibility我必须至少使用android studio 0.8.11(金丝雀)渠道).所以我已经更新了我的android工作室,但我仍然有问题.

现在,我必须使用gradle 1.10和android gradle插件0.12.+才能工作

来自AS的错误

Error:No such property: projectDependencies for class: com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated

编辑:

这是我的build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        // works with 0.12.+ (not with 0.13.+)
        classpath 'com.android.tools.build:gradle:0.12.+'

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

        // The latest version of the android-apt plugin
        classpath …
Run Code Online (Sandbox Code Playgroud)

android android-studio android-gradle-plugin

7
推荐指数
1
解决办法
7214
查看次数