I checked several different questions, but none of them provided a solution that worked for me. I am developing a project with Android annotations, and when I try to create my project, it fails with the following error (Project_Location is just my local project folder):
error: Could not find AndroidManifest.xml file at the specified path: [/Project_Location/mobile/build/intermediates/manifests/full/debug/AndroidManifest.xml]
Here is my mobile build.gradle file:
apply plugin: 'com.android.application' ext.androidAnnotationsVersion = '3.3.2'; ext.eventBusVersion = '2.4.0'; buildscript { repositories { jcenter() } dependencies { classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' } } apply plugin: 'android-apt' dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') wearApp project(':wear') compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.google.android.gms:play-services:8.3.0' apt "org.androidannotations:androidannotations:${androidAnnotationsVersion}" compile "org.androidannotations:androidannotations:${androidAnnotationsVersion}" apt "de.greenrobot:eventbus:${eventBusVersion}" compile "de.greenrobot:eventbus:${eventBusVersion}" } android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.dev.app_name" minSdkVersion 16 targetSdkVersion 23 versionCode 1 versionName "0.3" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } configurations { apt } apt { arguments { androidManifestFile variant.outputs.processResources.manifestFile resourcePackageName 'com.dev' } } android.applicationVariants.each { variant -> aptOutput = file("${project.buildDir}/source/apt_generated/${variant.dirName}") println "****************************" println "variant: ${variant.name}" println "manifest: ${variant.processResources.manifestFile}" println "aptOutput: ${aptOutput}" println "****************************" variant.javaCompile.doFirst { println "*** compile doFirst ${variant.name}" aptOutput.mkdirs() variant.javaCompile.options.compilerArgs += [ '-processorpath', configurations.apt.getAsPath(), '-AandroidManifestFile=' + variant.processResources.manifestFile, '-s', aptOutput ] } }
If the build.gradle file looks useless, I tried to implement several solutions without success. Therefore, if redundant statements that can be deleted, can also provide these offers. Right now, I'm just at a dead end why it cannot find my manifest file, which is clearly present.
source share