Go Down

Topic: Library can't use both 'src' and 'utility' folders. (Read 16099 times) previous topic - next topic

Hillwalker

So you're saying that you get the "Library can't use both 'src' and 'utility' folders." error when you try to verify or upload a sketch but when you open and close Library Manager you don't get any warnings like that?
That's right. The src/utility error message only shows up when I compile a sketch. Any sketch. I've been testing with the setup/loop template that shows up when you open the IDE.

--
Victoria, BC
48 57'N 123 13'W

pert

That makes it more difficult to determine which library is causing the problem but is more evidence that this is a bug. If I intentionally create the error by, for example, moving the utility folder from inside of the src folder to the root folder of the Ethernet library then I get this error message when compiling any sketch:
Code: [Select]
Library can't use both 'src' and 'utility' folders.
And after I open and close Library Manager I get this same message repeated 7 times in the console(or whatever it's called):
Code: [Select]
Invalid library found in C:\Program Files (x86)\arduino-1.6.6\libraries\Ethernet: Library can't use both 'src' and 'utility' folders.

TheNorm

The only one of those libraries I could find was TimerOne_v9 here. I installed it and didn't get any warnings and the only folder in it is examples. What unconventional folder do you have inside of your copy of that library?
Oops, you're right. I went back and checked again. Not sure what I was looking at before.


pert

So it sounds like Arduino IDE 1.6.6 is causing "Library can't use both 'src' and 'utility' folders." errors and "Invalid library found" warnings incorrectly but only for some people. That's the worst kind of bug to get fixed because if the developers can't reproduce the bug it's hard for them to take it seriously or test if they have fixed it. @TheNorm what operating system are you using? If Windows did you use the Installer or ZIP file? 32 or 64 bit? I'll see if I can find a common thread between all reports of this sort of issue. I see Hillwalker is using Windows Installer with Windows 10 32 bit.

dnfi

I'm not sure if this helps but I had the same problem on my system (32bit Windows 7) after I installed Arduino 1.6.6.

I tried uninstalling, removing the complete Arduino directory under Program Files and reinstalling. The problem was still there.

I then tried removing the Ethernet, Robot_Control, SD, TFT, and WiFi libraries as suggested by Hillwalker. I was then able to compile the default empty sketch.

I then added the removed libraries back one at a time and found that the SD library was the only one that caused the problem.

I removed it again and then re-installed it from the library manager and am able to compile without error.

pert

I then tried removing the Ethernet, Robot_Control, SD, TFT, and WiFi libraries as suggested by Hillwalker.
Where was the SD library you removed located?

dnfi

The SD library was in \Program Files\arduino\libraries\

When I re-installed it from the Library Manager it was installed to \My Documents\arduino\libraries\


pert

Thanks for the information dnfi! I've added it to the issue report.

dnfi

Further to my last post -
I just tried moving the SD library from \My Documents\arduino\libraries\ to \Program Files\arduino\libraries\

The error came back.

Moving the SD library back to \My Documents\arduino\libraries\ fixed it again.

Hope this helps.

wm1583

I started getting this error after I updated some libraries a few days ago.  I uninstalled and deleted EVERYTHING on my computer relating to arduino IDE.  I've been getting this error constantly now.  I've followed you'r manage library request, and here's the result;

Arduino: 1.6.6 (Windows 10), Board: "Arduino/Genuino Uno"

Library can't use both 'src' and 'utility' folders.

Error compiling.
Invalid library found in C:\Program Files (x86)\Arduino\libraries\LiquidCrystal: Library can't use both 'src' and 'utility' folders.
Invalid library found in C:\Program Files (x86)\Arduino\libraries\LiquidCrystal: Library can't use both 'src' and 'utility' folders.
Invalid library found in C:\Program Files (x86)\Arduino\libraries\LiquidCrystal: Library can't use both 'src' and 'utility' folders.
Invalid library found in C:\Program Files (x86)\Arduino\libraries\LiquidCrystal: Library can't use both 'src' and 'utility' folders.
Invalid library found in C:\Program Files (x86)\Arduino\libraries\LiquidCrystal: Library can't use both 'src' and 'utility' folders.
Invalid library found in C:\Program Files (x86)\Arduino\libraries\LiquidCrystal: Library can't use both 'src' and 'utility' folders.
Invalid library found in C:\Program Files (x86)\Arduino\libraries\LiquidCrystal: Library can't use both 'src' and 'utility' folders.


I'm new to arduino so fixing problems like this is tricky for me...  This error happens with any sketch I try compiling, even the examples like blink and state change. 

pert

Take a look at the C:\Program Files (x86)\Arduino\libraries\LiquidCrystal folder. Does it have a utility folder anywhere? Please let me know as I'm trying to get the Arduino developers to understand this is a bug but they(and me) can't reproduce it so they don't believe it exists. In my installation there is only a src folder and no utility folder.

To fix this try moving the two files that are inside of the C:\Program Files (x86)\Arduino\libraries\LiquidCrystal\src folder to C:\Program Files (x86)\Arduino\libraries\LiquidCrystal and delete the src folder, then restart the Arduino IDE. Let me know if that works to fix the problem.

ing_poveda

hola a todos lo que encontré y asta ahora me a funcionado es que dentro de src se encuentra otra carpeta utility  elimine la que estaba por fuera

sterretje

hola a todos lo que encontré y asta ahora me a funcionado es que dentro de src se encuentra otra carpeta utility  elimine la que estaba por fuera
Please post in English. I assume that your reply relates to the problem.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

DAVIDLIPTROTT

I am trying to install the f/m lcd library and keep getting this error message

Arduino: 1.6.8 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Specified folder/zip file does not contain a valid library
Invalid library found in C:\Users\user\Documents\Arduino\libraries\arduino_75306: C:\Users\user\Documents\Arduino\libraries\arduino_75306
Invalid library found in C:\Users\user\Documents\Arduino\libraries\arduino_75306: C:\Users\user\Documents\Arduino\libraries\arduino_75306

Has this got something to do with the problem being discussed. I've spent hours trying to resolve the problem.

pert

Has this got something to do with the problem being discussed.
no

I am trying to install the f/m lcd library
Please post a link to where you downloaded the library

Invalid library found in C:\Users\user\Documents\Arduino\libraries\arduino_75306: C:\Users\user\Documents\Arduino\libraries\arduino_75306
This is a separate issue but I can help you fix it. Please do the following:
  • Windows Start Menu > Run > type "cmd" > Enter
  • type: dir/s C:\Users\user\Documents\Arduino\libraries\arduino_75306 > C:\Users\user\Desktop\libraryfolders.txt
  • Press Enter
  • Copy the contents of or attach the file libraryfolders.txt found on your desktop to a post here.

This will show me the contents of the invalid library folder so I can see what needs to be changed to make it valid.

Go Up