as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
This page helps you resolve common issues when building and running apps with Vega Studio in VS Code. If you don’t find a solution to your specific problem here, post an issue in the Developer Forum for additional support.

Port forwarding fails with “operation unsuccessful” error

Cause: This error occurs when the Vega Virtual Device isn’t running. Solution:
  1. Go to Vega Studio > Devices.
  2. If the status shows VirtualDevice:Tv (Not running), go to Projects and select the Play button next to your project name.

Error loading webview in VS Code

While using VS Code, your screen might display the following message:
Cause: This error happens when multiple instances of VS Code are open. Solution: Quit all open instances of VS Code, then restart it.

React Native Tools extension fails to activate when creating a new project

When creating a new project, you might receive this error message:
Cause: VS Code workspace configuration issues prevent the React Native Tools extension from loading properly. Solution: Open your project as a workspace in the VS Code toolbar (File > Open Workspace from File) and save it as a new workspace.

React Native Packager is already running when trying to launch the app

When trying to launch your app, you see this error:
Cause: This issue happens when you have a multi-project workspace and an app is currently running. Solution: Stop the packager before launching another app. In the VS Code Command Palette, enter React Native: Stop Packager.

React Native Tools packager becomes unresponsive after selecting the wrong project

When running multiple projects and accidentally selecting the wrong project name in the React Native Packager, the React Native: Stop Packager command becomes disabled. Cause: The React Native Tools extension loses track of the active packager process when you select the wrong project. Solution: Reload the VS Code window from the Command Palette.
  1. Press Ctrl+Shift+P (Linux) or Cmd+Shift+P (Mac) to open the Command Palette.
  2. Enter Developer: Reload Window.
  3. Select the command to reload VS Code.
  4. Restart your project’s packager.

No project templates appear when selecting a template

Cause: The current VS Code session doesn’t properly load environment variables from the Vega SDK. Solution: To load the Vega SDK environment variables, run the following command, then open VS Code from the same terminal using code:

Build or launch fails due to port conflicts

Cause: Another process is using the required port. Solution: To resolve the port conflict, set a different React Native port in VS Code. For steps, see “Step 3: (Optional) Configure a custom port” in Build an App with Vega Studio.

The Fast Refresh feature doesn’t update the app when making code changes

Cause: Connection issues with port forwarding prevent Fast Refresh from communicating with the device. Solution: Reset the reverse port forwarding connection and relaunch your app:
  1. List the current reverse port forwarding rules:
  2. Remove all reverse port forwarding rules:
  3. Relaunch your app.

Line-by-line debugging isn’t working

Cause: Developer Mode isn’t configured, or the debug host setting is missing from shared_preferences.json. Solution: To resolve the issue, verify Developer Mode and check shared_preferences.json. For details, see Configure Developer Mode on Fire TV Stick. To enable line-by-line debugging on a custom port, add the following configuration to the /data/shared_preferences.json file on the device:
Replace with the port number you’re using.

Build fails with “Missing [os.version]” error

When building your app, you see the following error:
Cause: Starting with Vega SDK 0.24, the [os.version] section is required in manifest.toml. Existing projects created before this requirement don’t include it. Solution: Run the following command from your project root, then rebuild:
You can also add the section to manifest.toml manually:
For SDK 2.0, min = "2.0" is the recommended setting. For when to use 1.2 instead, see Choose min. Don’t add OS version module entries (/com.amazon.vega.os@IVega_*) to your source manifest.toml. The build generates them from [os.version]. For details, see Manifest [os.version] Section. To upgrade an existing app to target OS 2.0 while continuing to support OS 1.2, see Upgrade Your App’s OS Version Compatibility. If your app was built with SDK 0.23 or earlier, see Migrate from SDK 0.23 or earlier.
最后修改于 2026年10月30日