Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDK 4.2 broken

ANSWERED

What a terrible mess. I'm following the guide. It says to select the correct device for the package.json file and click run. I get these errors:

  • This project is being built without a companion component. Create a file named companion/index.ts or companion/index.js to add a companion component to your project.
  • This project is being built without a settings component. Create a file named settings/index.tsx, settings/index.ts, settings/index.jsx or settings/index.js to add a settings component to your project.
  • Building app for Fitbit Versa 2
  • Error: One or more required files do not exist in the project: resources/index.gui and resources/widgets.gui
  • Build failed.

All files should be created when I select my device type.

Fix this.

Or don't. 

Best Answer
1 BEST ANSWER

Accepted Solutions

Please see this response: other solution. It got me past this error.

 

For brevity, here's the answer from that other post:


You need to rename the "index.view" file to "index.gui" and rename "widget.defs" to "widgets.gui".

View best answer in original post

Best Answer
11 REPLIES 11

Josh these files are required for certain app functionality.  They are not and never have been created automatically upon compiling/building.

 

I suggest that you create at least a blank file with each of those names. The best thing to do is use the sdk template to create a settings project, then import your existing code and build it again.  

 

Best Answer
0 Votes

Please see this response: other solution. It got me past this error.

 

For brevity, here's the answer from that other post:


You need to rename the "index.view" file to "index.gui" and rename "widget.defs" to "widgets.gui".
Best Answer

Thanks Weston for the brief answer to the agonizing problem of why the sample clock would NOT Run on the Fitbit simulator.

 

Fitbit needs to do better!  It is ridiculous to post sample clocks that needed googling for the solution.

 

This community site also irritated in insisting on a User name - i used what was on my iOS Fitbit app.  It rejected it.  Eventually I simply typed and hence my crazy User name that I haven't figured out how to change.

 

C'mon Fitbit!  You will chase away users and developers with the non-intuitiveness of your web programming.

Best Answer

Thanks Weston! I wish this were automatic in the kit but thanks for the workaround. 

Best Answer
0 Votes

however 

  • This project is being built without a companion component. Create a file named companion/index.ts or companion/index.js to add a companion component to your project.
  • i have a red screen on simulator no clock.
Best Answer

I cant create a file named companion/index.js because apparently / is an illegal character

Best Answer
0 Votes

`companion` is a folder (directory) name. If a folder called that doesn't exist, create one. Then create a file named `index.js` within it.

Peter McLennan
Gondwana Software
Best Answer

hello, I am having trouble building a watchface for my fitibt versa 2. I press build and it just comes up with this error message - One or more required files do not exist in the project: resources/widgets.gui

 

 

Best Answer
0 Votes

You're probably building for SDK5+, rather than SDK4 (Versa 2).

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I am very new to fitbit studio, what exactly do you mean?

Best Answer
0 Votes

I don't use Studio, but I think that, by default, it builds things for newer watches. You need to fight with it a bit to get it to target ealier watches. Have a look at the 'Best Answer' above. The link target probably provides more info, but it isn't working for me. Searching the forum for 'package.json' might also surface some relevant posts.

Peter McLennan
Gondwana Software
Best Answer
0 Votes