Stuck on a "File specified for property 'bundle' does not exist"

3,997 views
Skip to first unread message

Cyril Mottier

unread,
May 27, 2013, 5:01:17 PM5/27/13
to adt...@googlegroups.com
I currently have the following issue on a project using Google Play Services and ActionBarSherlock (in a multi-project fashion). I've looked into the detail and can't understand what is actually happening. Do we have to add something for the build system to use .aar or is it done automatically?

Thank you

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:prepareAVelovGradleLibrariesActionBarSherlock431ActionbarsherlockUnspecifiedLibrary'.
> File '/Users/cyrilmottier/Documents/Perso/AVelovGradle/libraries/action-bar-sherlock-4.3.1/actionbarsherlock/build/libs/actionbarsherlock.aar' specified for property 'bundle' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Xavier Ducrohet

unread,
May 29, 2013, 12:28:54 AM5/29/13
to adt...@googlegroups.com
Can you show us the list of tasks that are running just prior to this happening?

The workflow here when building the "app" module is to make sure the dependencies are built first. Then the dependency processing creates a prepare tasks for each library that will ensure that the aar file is extracted into the app's build folder so that we can use the content.

Here it looks like somehow the prepare task is called but the library's output wasn't created at all. can you check if that file actually exists?


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Cyril Mottier

unread,
May 31, 2013, 3:31:56 AM5/31/13
to adt...@googlegroups.com
Thank you Xavier. Here is my setup (I've just switched to 0.4.2 but it doesn't fix my issue) :

settings.gradle

include ':app'
include ':libraries:action-bar-sherlock-4.3.1:actionbarsherlock'

build.gradle

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:0.4.2'
    }
}

app/build.gradle

apply plugin: 'android'

dependencies {
    compile project(':libraries:action-bar-sherlock-4.3.1:actionbarsherlock')
compile 'com.google.android.gms:play-services:3.1.36'
}

android {
    compileSdkVersion 17
    buildToolsVersion '17'

    defaultConfig {
        versionCode 6
        versionName '1.2.3'
        minSdkVersion 8
        targetSdkVersion 17
    }
}

libraries/action-bar-sherlock-4.3.1/actionbarsherlock/build.gradle

apply plugin: 'android-library'

dependencies {
    compile 'com.android.support:support-v4:13.0.0'
}

android {
  compileSdkVersion 14
  buildToolsVersion '17'

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

I've looked at the build/ directory and I do have an .aar built in libraries/action-bar-sherlock-4.3.1/actionbarsherlock/libs/actionbarsherlock-4.3.1.aar

I still end up with 

:libraries:action-bar-sherlock-4.3.1:actionbarsherlock:bundleRelease UP-TO-DATE
:app:prepareAVelovGradleLibrariesActionBarSherlock431ActionbarsherlockUnspecifiedLibrary FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:prepareAVelovGradleLibrariesActionBarSherlock431ActionbarsherlockUnspecifiedLibrary'.
> File '/Users/cyrilmottier/Documents/Perso/AVelovGradle/libraries/action-bar-sherlock-4.3.1/actionbarsherlock/build/libs/actionbarsherlock.aar' specified for property 'bundle' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Jonathan Steele

unread,
May 31, 2013, 1:16:20 PM5/31/13
to adt...@googlegroups.com
on multiproject example has apply plugin: 'android-reporting' in root/build.gradle

Cyril Mottier

unread,
May 31, 2013, 1:34:51 PM5/31/13
to adt...@googlegroups.com
Sorry I made a mistake in my previous post. The file libraries/action-bar-sherlock-4.3.1/actionbarsherlock/build/libs/actionbarsherlock.aar doesn't exist. The existing file libraries/action-bar-sherlock-4.3.1/actionbarsherlock/build/libs/actionbarsherlock-4.3.1.aar.

I guess the "-4.3.1" part is added because ActionBarSherlock has a version in its "allprojects" block :

allprojects {
  group = 'com.actionbarsherlock'
  version = '4.3.1'

  repositories {
    mavenCentral()
  }
}

When getting rid of the version, the project compiles perfectly.

Xavier Ducrohet

unread,
May 31, 2013, 2:53:18 PM5/31/13
to adt...@googlegroups.com
This has no impact on the build. The android-reporting is done to aggregate test reports from all submodule.

Xavier Ducrohet

unread,
May 31, 2013, 2:54:14 PM5/31/13
to adt...@googlegroups.com
yea that's what I was thinking. I need to check how we generate the artifact that gets exported by the library project. It looks like it doesn't actually use the true artifact file name.

Kristian Sloth Lauszus

unread,
Dec 23, 2013, 9:28:15 PM12/23/13
to adt...@googlegroups.com
Did this issue ever get fixed or is there some work around it? I have the exact same problem as Cyril.

Regards
Lauszus

Christophe Smet

unread,
Feb 24, 2014, 6:23:01 AM2/24/14
to adt...@googlegroups.com
I haven't found any.
I've just deleted it and it works perfectly now.
I would appreciate it if someone could explain this.




Op dinsdag 24 december 2013 03:28:15 UTC+1 schreef Kristian Sloth Lauszus:

Ashok Raju

unread,
Mar 12, 2014, 7:33:31 PM3/12/14
to adt...@googlegroups.com
Here's a post that sort've explains it: https://github.com/Prototik/HoloEverywhere/issues/634

A person responded stating the issue has been fixed, but I only installed Android Studio today and ran into the issue, so seems like it's still a bug.
Reply all
Reply to author
Forward
0 new messages