簡體   English   中英

我想在Fastfile中使用REXML,但是當我在Fastfile中包含時不起作用

[英]I want to use REXML in Fastfile, but when I include in Fastfile doesn't work

在Fastfile中使用Rexml,但fastlane無法識別include,所以我不能包含Rexml模塊。

這是錯誤:

[!] Could not find action, lane or variable 'include'. Check out the documentation for more details: https://docs.fastlane.tools/actions

這是我在Fastfile中的代碼

#!/usr/bin/ruby
require 'rexml/document'
include REXML

使用:

require "rexml/document"
file = File.new( "movie.xml" )
xmldoc = REXML::Document.new file

代替:

#!/usr/bin/ruby -w
require 'rexml/document' 

# include REXML
xmlfile = File.new("movie.xml")
xmldoc = rexml.Document.new(xmlfile)

解決我的問題,但我仍然不知道為什么fastlane無法識別包含。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM