- 升级xcode12.5后报错 cannot initialize
- Cannot initialize a parameter of
- 升级Xcode12.5 DoraemonKit 编译Error:
- layoutCache[currentClass] = ivar
- xcode12. ld: library not found f
- RAC 常用方法目录(收集)
- pip升级后Import Error:cannot import
- 解决CocoaLumberjack在mm文件中的使用报错问题
- 报错 Cannot initialize a parameter
- XCode12.5 ReactNative环境报错:Cannot
经过多次查找,终于找到了解决的办法
直接在 Podfile 添加以下代码:
post_installdo|installer|
## Fix for XCode 12.5
find_and_replace("Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.mm","layoutCache[currentClass] = ivars;", "layoutCache[(id)currentClass] = ivars;")
end
end
deffind_and_replace(dir, findstr, replacestr)
Dir[dir].eachdo|name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
iftext != replace
puts"Fix: "+ name
File.open(name,"w"){ |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir +'*/'].each(&method(:find_and_replace))
end
网友评论