Error: Install Failure: No manifest. Invalid package.Install Failure: No manifest

Error: Install Failure: No manifest. Invalid package.Install Failure: No manifest

您好,我刚刚开始 Roku 开发。我下载了 sdk 并一直在尝试 运行 一个 hello world 应用程序。我有一个源文件夹和一个清单文件。但我仍然不断收到以下错误:

Error: Install Failure: No manifest. Invalid package.Install Failure: No manifest.

这是 hello world 的代码:

sub Main()
  ' create our screen
  screen = CreateObject("roPosterScreen") 

  ' setup a message port so we can receive event information
  port = CreateObject("roMessagePort")
  screen.SetMessagePort(port)

  ' change the screen's message text
  screen.ShowMessage("Hello World!")
  screen.Show()

  ' start our event loop
  while true
    msg = Wait(0, port) ' wait for an event

    if type(msg) = "roPosterScreenEvent"
      ' we got a poster screen event
      if msg.isScreenClosed()
        ' the user closed the screen
        exit while
      end if
    end if
  end while

  screen.Close()
  ' any time all screens in a channel are closed, the channel will exit
end sub

当我上传 sdk 附带的示例时,它工作正常但是当我尝试用上面的代码替换示例应用程序的 Main 函数的代码时,我得到上面指定的错误。

我一直在互联网上寻找这方面的信息,但没有太大帮助。任何建议将不胜感激。

听起来您的文件没有压缩 "correctly" 到包中。确保 manifest 文件位于 zip 文件的顶层,而不是子目录中。

这是人们指向项目目录的常见错误 - 右键单击​​并像这样压缩它 - 但路径中也包含根目录名称。进入项目目录,select 所有文件和 source 目录并以这种方式压缩。

如果你的亮脚本代码有任何错误,你永远不会得到这个错误

No manifest. Invalid package.Install Failure:

仅当您尝试上传无效的 zip 文件时才会出现此错误。