I'm having the same issue. I'm using a Arduino Mega2560 and I get this message:
Invalid library found in C:\Users\Lenovo\Documents\Arduino\libraries\Knight_Rider_Test_1: C:\Users\Lenovo\Documents\Arduino\libraries\Knight_Rider_Test_1
Invalid library found in C:\Program Files (x86)\Arduino\libraries\KnightRider: C:\Program Files (x86)\Arduino\libraries\KnightRider
Invalid library found in C:\Users\Lenovo\Documents\Arduino\libraries\Knight_Rider_Test_1: C:\Users\Lenovo\Documents\Arduino\libraries\Knight_Rider_Test_1
It automatically saves under my documents but it's looking at another directory (see above). I tried moving it to the directory it wants but still doesn't work. Not sure what else to do. Please help.
It is difficult to know without seeing your code which you did not post. Libraries need to be in a subdirectory under the libraries folder and your test code which calls the library needs to be in a subdirectory under your arduino directory. The filename (.ino) needs to be the same as the directory name.
Thanks blh64!
Installing new libraries has been more or less difficult, like woodoo, several times. Windows10 does its best to confuse. Arduino folders I find in more than one place. Now the Arduino folder You describe appears on the "popular list".
If you want an explanation of why they are considered invalid, I would need you to provide a directory listing or screenshot of the contents of the folders in Windows Explorer.
Without seeing the contents of those folders, I can't tell you why the Arduino IDE considers them to be invalid libraries. You should only ever install libraries in C:\Users\Lenovo\Documents\Arduino\libraries. Don't save sketches there. Don't put anything else there. Each library folder must be directly under C:\Users\Lenovo\Documents\Arduino\libraries, not in a subfolder.
The simple solution is to move those folders somewhere else.
afav8tor:
It automatically saves under my documents but it's looking at another directory (see above).
It's not clear what you mean by that. Likely you just don't understand the weird voodoo Windows does with the file system in a misguided attempt to make their OS more user friendly (actually does the opposite). This is why I never use any of those stupid special Windows folders, with the exception of the Desktop. Although it defaults to C:\Users\Lenovo\Documents\Arduino, you can set the location of your sketchbook folder to anywhere you like via File > Preferences > Sketchbook location. But I wouldn't recommend messing with that right now. You're plenty confused enough already without adding additional complications.
Railroader:
Installing new libraries has been more or less difficult, like woodoo, several times.
The Arduino IDE does try to make it very easy. If you use Sketch > Include Library > Manage Libraries... there will be no problems. If you use Sketch > Include Library > Add .ZIP library... and the author of the library has structured their library correctly there will be no problems. Unfortunately there are quite a few libraries out there which don't have the correct structure to allow you to install from the .zip file. In this case you can still use Sketch > Include Library > Add .ZIP library... but you need to first unzip the file and select the libraries subfolder of the unzipped folder. Where things get more confusing is if you do a manual library installation. The only time you need to directly mess with the libraries folder is when you are updating to a new version of an installed library that is not in Library Manager. The Arduino IDE GUI does not provide a way to update the library in this case and so you will need to delete the old library installation before doing the new installation. This is why all library authors should add their libraries to the Arduino Library Manager index.
afav8tor:
I'm having the same issue. I'm using a Arduino Mega2560 and I get this message:
Invalid library found in C:\Users\Lenovo\Documents\Arduino\libraries\Knight_Rider_Test_1: C:\Users\Lenovo\Documents\Arduino\libraries\Knight_Rider_Test_1
Invalid library found in C:\Program Files (x86)\Arduino\libraries\KnightRider: C:\Program Files (x86)\Arduino\libraries\KnightRider
Invalid library found in C:\Users\Lenovo\Documents\Arduino\libraries\Knight_Rider_Test_1: C:\Users\Lenovo\Documents\Arduino\libraries\Knight_Rider_Test_1
It automatically saves under my documents but it's looking at another directory (see above). I tried moving it to the directory it wants but still doesn't work. Not sure what else to do. Please help.
Usually, an "Invalid Library" message is just informative and DOES NOT prevent your sketch from compiling and uploading. If your sketch fails to compile, or compiles but fails to upload, then you likely have another problem. If you post ALL of the text from the box under your sketch, we might be able to tell you what that problem is.
Hi,
To help with any code problems, make on your c:\ drive this directory;
C:\ArduinoProjects
Then save ALL your code/sketches to this directory.
In the IDE Files; Preferences set the sketchbook folder to
C:\ArduinoProjects
This way each time you save a code or a new code it will always go there, which is well away from the library directory, which is what your code appears to be in.