Build Error!

What does it mean? It was working fine before. I’ve restarted GWS, but the problem persists.
image

blocked out area is the project name
image

It gives me this message when I open the GWS file.
image

It’s a cache issue, I was using the same file name for two different components. That seems to have corrupted GWS file. Luckily, my cloud backup was able to restore it; only lost 30 minutes of work.

Sometimes the same thing happens with fonts, forcing me to change fonts.

I haven’t experienced it with fonts yet, but I have had GWS files gone corrupted on me a couple of time. It’s best to use a cloud backup, so you can restore it.

I think is is a cache bug. Everything is working fine after I restored GWS file from the cloud and removed both component with same file name, then saved it as a different version. But when I tried to open the project this morning, it’s giving me the same warning; even though the Orange1.png has be removed. It seems the cache is stuck within GWS file.

image

Did you use restart of your computer or just let it go to sleep? If it just goes to sleep the cache is not changed.

Also open the workspace folder and see if there is a residual hidden folder which would indicate that GWS didn’t shut down correctly they should be written to the .gwd file and removed when a Project is closed.

Ron
Samsung Developer Program

The computer was shutdown overnight. The .gwd folder was removed by GWS when I closed the project.

I’ve experimented with the corrupted file a little. After removing the two components completely and saving it as a different project file. GWS is still giving the same warning about image file not found when I open the file.

Another possible culprit is cloud drive. My GWS files are stored on OneDrive (enterprise version), GWS creates and removes .gwd on OneDrive whenever I’m working on GWS projects. Since .gwd contains hundreds of files, OneDrive always asking for confirmation if I want to delete .gwd files after GWS has removed them. But I’ve been working like this with all watch face projects without issues.

First thing to check is the AOD mode that is one thing that everyone seems to forget to check for missing resouces.

Open a copy of the GWD file with a zip extractor and in the RES folder there should be a Watchface.xml and a resource.xml The resource.xml should only have one copy of a resource even it it is used more than one time.

the watchface.xml should have a copy of it and the new name you used. See if there is anything strange going on.

Ron

Thanks for the tips. I didn’t check AOD mode, but the image isn’t used in AOD. I’ll check it and the xml files and post the result here.

For some reason every so often something you add to the active watch face shows up in the AOD watch design. One of the Step Count complications would do that in GWD 1.8.1

Ron
Samsung Developer Program

I think I’ve figured it out what happened. The two components I used have change image action, each component contains different image files with the same name. So the files with same name gets messed up in res folder.

In this example, square and triangle are two individual component with action button to change image. Instead of naming each image file properly like red_square, blue_square for square and red_tri, blue_tri for triangle. I used the file name red1 for both red square and red triangle image files. That causes issues in res folder in .gwd folder. Interestingly GWS didn’t give any warning and emulator shows no error until I tried to open the saved GWS file.

image

Lesson learned, different files can’t shared the same name.

I’ll see if I can duplicate this and submit a bug report.

Ron
Samsung Developer Program

When I tried it, I got an error message and it wouldn’t let me rename it.

Ron
Samsung Developer Program

I couldn’t replicate the issue neither. I’ve built a mock of square and triangle example above in GWS with red square and red triangle image shared the same file name as red1.

After adding red triangle image to image change action list, I couldn’t add the red square image to the action list because GWS is adding the red triangle image (assuming from cache) even though the red square image was selected. But it didn’t give me any error message.

image

I don’t know what went wrong with the original project file. But I’ve since solved the issue by removing and rebuilding those two components with different file names. I guess the takeaway is don’t use the same file name for any image files.

I was adding a triangle and square then renaming them in GWS and it gave me an error message.

Ron
Samsung Developer Program