找不到名为'ios debug'的车道。可用车道:ios beta。

5

当我在Fastfile中添加了一个新的fastlane,就像这样:

default_platform(:ios)

platform :ios do
  desc "Push a new beta build to pgy"
  before_all do
    ENV["CACHE_GIT_URL"] = ENV["GIT_URL"]
  end

  lane :debug do
    xcode_select "/Applications/Xcode.app"

    match(
        type: "adhoc"
    )

    build_app(
        workspace: "Runner.xcworkspace",
        scheme: "Runner",
        export_method: "ad-hoc",
        skip_archive: true
    )

    pgyer(
        api_key: ENV['PGY_API_KEY'],
        user_key: ENV['PGY_USER_KEY']
    )
  end

  lane :beta do
    xcode_select "/Applications/Xcode_12.4.app"
    if is_ci
      create_keychain(
        name: ENV['MATCH_KEYCHAIN_NAME'],
        password: ENV["MATCH_KEYCHAIN_PASSWORD"],
        default_keychain: true,
        unlock: true,
        timeout: 3600,
        lock_when_sleeps: false
      )
    end

    match(
      app_identifier: ENV["APP_IDENTIFIER"],
      git_url: ENV["GIT_URL"],
      type: "adhoc",
      readonly: is_ci,
      keychain_name: ENV['MATCH_KEYCHAIN_NAME'],
      keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"]
    )

    build_app(
        workspace: "Runner.xcworkspace",
        scheme: "Runner",
        export_method: "ad-hoc",
        skip_archive: true
    )

    pgyer(
        api_key: ENV['PGY_API_KEY'],
        user_key: ENV['PGY_USER_KEY']
    )
  end
end

我添加了一个名为debug的新通道,但是当我运行以下命令时:

bundle exec fastlane debug

显示错误:

$ bundle exec fastlane debug                                                                                                                                            ‹ruby-2.7.2›
[✔] 
+-----------------------+---------+--------+
|               Used plugins               |
+-----------------------+---------+--------+
| Plugin                | Version | Action |
+-----------------------+---------+--------+
| fastlane-plugin-pgyer | 0.2.2   | pgyer  |
+-----------------------+---------+--------+

[16:51:14]: ------------------------------
[16:51:14]: --- Step: default_platform ---
[16:51:14]: ------------------------------
+------------------+-----+
|      Lane Context      |
+------------------+-----+
| DEFAULT_PLATFORM | ios |
+------------------+-----+
[16:51:14]: Could not find lane 'ios debug'. Available lanes: ios beta

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
+------+------------------+-------------+

[16:51:14]: fastlane finished with errors

[!] Could not find lane 'ios debug'. Available lanes: ios beta

我该怎么做才能修复它?


是的,我保存了Fastlane文件@Akif - Dolphin
你解决了这个问题吗? - Akif
这个问题现在已经消失了,但我不知道为什么会出现这个问题。也许我重新安装了 Ruby 或者切换和降级了 Ruby 版本来避免这个问题。@Akif - Dolphin
好的,你可以将这些可能性作为答案添加。这可能会帮助其他人。我已经开始了一个在2天内到期的悬赏。 - Akif
我认为我的解决方案不是一个可靠的方法,也许有人能够详细解释一下。我不确定我的方式是否正确。@Akif - Dolphin
显示剩余2条评论
1个回答

0

我会回答其他遇到这个问题的人。

请打开Fastfile文件。

编辑:

lane :... do
  ...
end

回到你的代码。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接