Question
I'm encountering file not found errors when running the System Info sample application in Tizen Studio 2.4 with the TV emulator. The errors occur for JavaScript files that should be included with the sample:
GET file:///C:/Users/abhilashk/TizenTV_workspace/SystemInfo/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.min.js net::ERR_FILE_NOT_FOUND index.html:12
GET file:///C:/Users/abhilashk/TizenTV_workspace/SystemInfo/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.min.js net::ERR_FILE_NOT_FOUND
I downloaded this project through Tizen Studio's "New Project → Online Samples → System Info" option, but the required JS files are missing. As a beginner in TV app development, I'm looking for guidance on how to resolve this dependency issue.
Answer
Problem Understanding
The issue occurs because the sample project references JavaScript framework files that aren't automatically downloaded with the project. The missing files are part of the Tizen Web UI Framework, which needs to be manually added to the project.
Solution Methods
-
Download the Framework Manually:
- Get the Tizen Web UI Framework from the official source
- Place the files in the correct directory structure as referenced in your index.html
-
Use the Official Sample Code:
- Download the complete SystemInfo sample from the official Tizen sample repository
- Replace your project files with the complete sample files
-
Local File Reference:
- After obtaining the framework files, update the file paths in index.html if needed
Code Examples
Here's the corrected index.html structure with proper file references:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="description" content="System info API Tutorial"/>
<title>System info</title>
<!-- Make sure these paths correctly point to your framework files -->
<script src="js/tizen-web-ui-fw/jquery.min.js"></script>
<script src="./js/config.js"></script>
<script src="js/tizen-web-ui-fw/tizen-web-ui-fw-libs.min.js"></script>
<script src="js/tizen-web-ui-fw/tizen-web-ui-fw.min.js"
data-framework-viewport-scale="false"
data-framework-theme="tizen-white"></script>
<script type="text/javascript" src="./lib/TVKeyValue.js"></script>
<script type="text/javascript" src="./js/main.js"></script>
<link rel="stylesheet" type="text/css" href="./css/style.css"/>
</head>
Additional Tips
- Always verify file paths in your project
- Consider using relative paths instead of absolute paths for better portability
- The Tizen Web UI Framework can be downloaded from the official Samsung Tizen OS resources
- For the most up-to-date samples, check the official documentation at Samsung Tizen OS Developer Portal