Hello,
I’m trying to use the Spark Dev Mac app (latest release) to upload code. However, anytime I try to compile the code, I get an error at the bottom which says “App code was invalid.” When i clicked on it, the panel that shows up at the top said no compile errors. I tried this with the blink program that comes with the core, and it did not work as well.
@ mihirt - compile and upload ‘what’ way? Do you mean saving to a clean folder? I tried that but it still does not work. I’ve also tried some basic code ‘Blink LED’ without referencing libraries.
I had the same problem.
But I think it’s because you have more files in your project directory.
Try moving the files of your project in one folder, (only the ones you need, libraries, etc.)
Then restart the SparkDev Editor, and now open your file from the new directory.
I notice you can’t even use any directories under the root, just your .ino and all your libs .cpp and .h files need to be under the root folder for it to compile, at least on the mac version that appears to be the case.
@mihirt, in your screenshot it appears the file is correctly named, but you will get the same generic error if the sketch is not saved with a ‘.ino’ extension.
Also, there can be only a single .ino file in the directory. The compiler seems to be quite picky about the file system structure, as also pointed out by rog3r and mtnbrit.
@harrisonhjones I was about to do that hahaha. But anyway it is working for me already. Reading @cayuse and @rog3r posts I realize that even .html or .js files cannot be inside as well.
The folder must be plain empty except for the .ino file that I am using… Really very picky program hahaha.
I had also the same problem, solved in the same way. I use git as version control of my code, but it didn’t work until I moved it to new folder without the .git files.
Any idea how to use git version control without interrupt Spark dev to compile and flash?
By the way, I am using win7, so it’s not just win8/win8.1 problem.
I’m able to get simple projects working if I create a folder call “Projects” in my Spark Dev folder. I then save the files to that folder and put the extension .ino at the end of the saved file manually.
.cpp gives a zillion errors and .h flashes but nothing happens.
A clean directory is needed like it is stated here above… The bad ugly thing is that it makes it hard to keep version control for git… Since git uses directories inside the project directory!!!