Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Android Studio and Gradle #869

@theDazzler

Description

@theDazzler

I'm trying to get AA to work in Android Studio using Gradle and nothing seems to work. This is the error I'm getting:
: 20:21:07.345 [Daemon] ERROR o.a.h.AndroidManifestFinder:134 - Could not find the AndroidManifest.xml file, going up from path

This is a brand new android project. I haven't done anything except try to get AA working.

Here is my build.gradle file

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.7.+'
        // the latest version of the android-apt plugin
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.1'
    }
}

repositories {
    mavenCentral()
}

apply plugin: 'android'
apply plugin: 'android-apt'
def AAVersion = '3.0'

dependencies {
    apt "org.androidannotations:androidannotations:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"
}

apt {
    arguments {
        // you can set annotation processing options here, like these commented options:
        // logLevel 'INFO'
        // androidManifestFile 'path to file'
    }
}

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    sourceSets {
        main {
            manifest.srcFile 'src/main/AndroidManifest.xml'
            java.srcDirs = ['src/main/java']
            resources.srcDirs = ['src/main/res']
            res.srcDirs = ['src/main/res']
            assets.srcDirs = ['assets']
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
}

I've tried changing the paths in the sourcesets but it doesn't work. How can I get this to work with Android Studio? The code in the wiki for Gradle does not work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions