Troubleshooting
If your app doesn't build, you can troubleshoot error messages in the Logcat console to identify what might be causing the issue. You can use these messages in context of the information you see in Troubleshooting Recipe Configurations.
If you can't resolve your issue, see the Fire TV and Fire TV Stick categories on the Support Forums.
Viewing Error Messages
If you build Fire App Builder and see an error like the following, you'll need to troubleshoot the reasons why.
Before you can make sense of error messages, you need to understand how to view error messages in Android Studio. When you build your project, expand the Logcat pane at the bottom. Make sure you have the right filters selected — as shown in the following screenshot, select the device connected, the com.fireappbuilder.android.calypso package, and Error.
When you build your app, if there's an error, it will appear at the top. The following sections explain how to interpret the various errors you might encounter.
Recipe chain failed
Here's a sample message related to recipe chain failure:
08-10 12:48:11.163 23186-23186/com.fireappbuilder.android.calypso E/ContentBrowser: Recipe chain failed:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.amazon.android.model.content.ContentContainer.getName()' on a null object reference
Or a related one:
08-10 12:57:45.354 24945-24945/com.fireappbuilder.android.calypso E/ContentBrowser: Recipe chain failed:
java.lang.ClassCastException: java.util.HashMap cannot be cast to java.util.ArrayList
Fire App Builder is having trouble with the recipes — specifically, the ContentContainer recipe, which refers to the Categories recipe.
See the tutorial in Troubleshooting Recipe Configurations. Look to see what Fire App Builder is capturing for categories in your recipe. See Step 3: Set Up the Categories Recipe to review the right configuration.
If the categories look good, resume the debugger and look at what Fire App Builder is capturing for the contents in your recipe. With the contents recipe results, you'll see all elements or properties in your items, but you'll likely only be mapping a subset of those items. Fire App Builder requires these properties for its content model:
mTitle
mId
mDescription
mUrl
mCardImageUrl
mBackgroundImageUrl
Make sure that the values you're mapping to Fire App Builder model names all have valid values. For example, if the error message in Logcat says Model object not valid
and shows mBackgroundImageUrl=''
(a required field) as empty, then make sure your matchList
parameter in the Contents recipe correctly selects the value for that field and maps it to that Fire App Builder content model element. See Step 6: Set Up the Contents Recipe to review more details related to this recipe.
Navigator parsing fails
Suppose you get a Navigator parsing failed message such as the following when building your app:
E/NavigatorModelParser: Navigator parsing failed!!! com.fasterxml.jackson.databind.JsonMappingException: Unexpected character ('}' (code 125)): was expecting double-quote to start field name
Check your Navigator.json file to make sure the JSON is valid. An extra comma that makes it invalid can cause this error. Also see that the Navigator.json file in your app's assets > recipes folder points to the correct files, and that your data loader file is loading the correct recipe.