error: The container 'Android Dependencies' references non existing library

6,218 views
Skip to first unread message

Ronald K

unread,
Jan 9, 2014, 8:37:07 AM1/9/14
to phon...@googlegroups.com
I created a new project using the CLI, Cordova version 3.3.1-0.1.2.
Added platforms iOS and Android.
Opened Eclipse, made sure all SDKs were up to date.
Added a new project via File > New > Project... > Android Project from existing code
In the Import Projects, browsed to platforms/android
It presented two projects:
1. /Users/me/Documents/apps/MyApp/platforms/android
2. CordovaLib
I don't recall seeing the CordovaLib project in previous projects, but then this is my first Cordova 3.3.1 project.
Anyway, both were selected, and I clicked Finish to import them.

That's when I got the error: The container 'Android Dependencies' references non existing library '/Users/me/Documents/apps/MyApp/platforms/android/CordovaLib/bin/myapp-cordovalib.jar' 
There indeed is no such jar.

Any ideas on how to fix this?

Perhaps related: with Cordova 3.0.0, there was a cordova-3.0.0.jar in platforms/android/libs. In my 3.3.1 project the libs folder is empty. Is that OK?

No problems with the iOS platform project.

Ronald K

unread,
Jan 9, 2014, 9:58:58 AM1/9/14
to phon...@googlegroups.com
Fwiw, I can build and run the app using the command line.

Pedro Cernausan

unread,
Jan 21, 2014, 8:58:11 AM1/21/14
to phon...@googlegroups.com
Hello Ronald!

We have the same problem here... u solved this?

Thanks a lot!
Message has been deleted

Ronald K

unread,
Jan 22, 2014, 6:30:24 AM1/22/14
to phon...@googlegroups.com
No, still no luck. Just tried it again but got the same error.


Op dinsdag 21 januari 2014 14:58:11 UTC+1 schreef Pedro Cernausan:

Michael

unread,
Jan 22, 2014, 11:36:16 AM1/22/14
to phon...@googlegroups.com
When you get to:

It presented two projects:
1. /Users/me/Documents/apps/MyApp/platforms/android
2. CordovaLib

Don't import the CordovaLib Projekt.
Message has been deleted

Ronald K

unread,
Jan 22, 2014, 1:35:12 PM1/22/14
to phon...@googlegroups.com
After cleaning and building the projects several times, my app would finally build. Hallelujah.

There no longer is a cordova.jar; it has been replaced by the CordovaLib library. So both projects need to be imported when creating the Android project. It actually says so in the documentation for edge.

Fwiw, I found this discussion http://stackoverflow.com/questions/20659853/cordova-ant-jar-not-available on the issue.

Cheers, Ronald

Op donderdag 9 januari 2014 14:37:07 UTC+1 schreef Ronald K:

Amitava Bhaduri

unread,
Mar 4, 2014, 9:51:57 AM3/4/14
to phon...@googlegroups.com
Ronald,
I could not get around this problem in mine. I tried cleaning and building the way you suggested a number of times, but still no luck. Is there another trick which you forgot to mention?
Thanks,
Amit

Ronald K

unread,
Mar 4, 2014, 3:47:35 PM3/4/14
to phon...@googlegroups.com
Sorry, I don't recall the exact sequence. I think it was a combination of cleaning and building both projects, one at a time.

Good luck....

Op dinsdag 4 maart 2014 15:51:57 UTC+1 schreef Amitava Bhaduri:

Amritesh Madhur

unread,
Mar 5, 2014, 3:46:33 AM3/5/14
to phon...@googlegroups.com
Amitava,

I was also facing this issue, quite frustrating!!!!. Followed following steps to resolve this issue:

  1. Import both the project Hello and cordova lib project 
  2. Remove the reference project(Cordova lib) from Hello Project. RightClick project-> Android-> Click reference project and Click Remove
  3. Clean the lib project and rebuild it , repeat this steps couple of time, till you don't see the yellow sign appears to lib project(which is a warning sign).
  4. Then again go to your Hello project and add the reference of the lib project you are done now. Error should go off by now. 
Amritesh

nroo

unread,
Apr 20, 2014, 6:43:52 PM4/20/14
to phon...@googlegroups.com
Amritesh Madhur <amriteshmadhur@...> writes:

>
>
> Amitava,
> I was also facing this issue, quite frustrating!!!!. Followed following
steps to resolve this issue:
>
>
> Import both the project Hello and cordova lib project 
>
> Remove the reference project(Cordova lib) from Hello Project. RightClick
project-> Android-> Click reference project and Click Remove
>
> Clean the lib project and rebuild it , repeat this steps couple of time,
till you don't see the yellow sign appears to lib project(which is a warning
sign).
>
> Then again go to your Hello project and add the reference of the lib
project you are done now. Error should go off by now. 
>
>
> Amritesh
>
> On Tuesday, March 4, 2014 8:21:57 PM UTC+5:30, Amitava Bhaduri
wrote:Ronald,I could not get around this problem in mine. I tried cleaning
and building the way you suggested a number of times, but still no luck. Is
there another trick which you forgot to mention?
> Thanks,
> AmitOn Wednesday, January 22, 2014 10:35:12 AM UTC-8, Ronald K wrote:After
cleaning and building the projects several times, my app would finally
build. Hallelujah.There no longer is a cordova.jar; it has been replaced by
the CordovaLib library. So both projects need to be imported when creating
the Android project. It actually says so in the documentation for edge.Fwiw,
I found this discussion http://stackoverflow.com/questions/20659853/cordova-
ant-jar-not-available on the issue.Cheers, RonaldOp donderdag 9 januari 2014
14:37:07 UTC+1 schreef Ronald K:
> I created a new project using the CLI, Cordova version 3.3.1-0.1.2.
>
> Added platforms iOS and Android.
> Opened Eclipse, made sure all SDKs were up to date.
> Added a new project via File > New > Project... > Android Project from
existing code
> In the Import Projects, browsed to platforms/android
> It presented two projects:
> 1. /Users/me/Documents/apps/MyApp/platforms/android
> 2. CordovaLib
> I don't recall seeing the CordovaLib project in previous projects, but
then this is my first Cordova 3.3.1 project.
> Anyway, both were selected, and I clicked Finish to import them.
>
> That's when I got the error: The container 'Android Dependencies'
references non existing library
'/Users/me/Documents/apps/MyApp/platforms/android/CordovaLib/bin/myapp-
cordovalib.jar' 
> There indeed is no such jar.
>
> Any ideas on how to fix this?
>
> Perhaps related: with Cordova 3.0.0, there was a cordova-3.0.0.jar in
platforms/android/libs. In my 3.3.1 project the libs folder is empty. Is
that OK?
>
> No problems with the iOS platform project.
>
>
>
>
>
>
>
>
>

If you followed the steps in this guide:
http://docs.phonegap.com/en/3.4.0/guide_platforms_android_index.md.html#Andr
oid%20Platform%20Guide

You will get the error after importing the two projects (HelloWorld and
HelloWorld-CordovaLib) into Eclipse.

Verify this:
Open each of the two projects and you will see that .project file of hello-
CordovaLib project generated by the steps as instructed,
does not have a Android nature. The .project file of the hello project
contains that Android nature, though.

The Solution:
Close Eclipse
Open the .project files and, by copying from the one .project file to the
other,
Change this:
<?xml version="1.0" encoding="UTF-8"?><projectDescription><name>HelloWorld-
CordovaLib</name></projectDescription>

To this:
<projectDescription>
<name>HelloWorld-CordovaLib</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>


The problem is really the missing nature of the CordovaLib project.
Start Eclipse and continue with the steps above where you left.
First clean the CordovaLib project and build it.
When you add to the hello project the reference to the CordovaLib project,
delete the one with the red cross first.

nroo

nroo

unread,
Apr 20, 2014, 8:47:18 PM4/20/14
to phon...@googlegroups.com
Minor correction:
The corrected .project file must begin of course with "<?xml version="1.0" encoding="UTF-8"?>" like the original faulty one.
I omitted it below when doing Copy/Paste.

nroo

sayap biru

unread,
Apr 21, 2014, 5:20:31 AM4/21/14
to phon...@googlegroups.com

i also encouter this problem....my solution very simple .....in eclipse under Project ->Build Automatically.

makesure u select Build Automatically then try import the project.

I noticed whenever i didnt select build automatically i will have missing .jar in cordavalib folder.
Reply all
Reply to author
Forward
0 new messages